Python command for setting plot window size

This commit is contained in:
Gaute Lindkvist
2019-10-16 15:46:31 +02:00
parent 4dcdc2a1ee
commit 3eaf933efc
5 changed files with 23 additions and 4 deletions

View File

@@ -8,8 +8,10 @@ import rips
# Load instance
resinsight = rips.Instance.find()
# Set window size
# Set window sizes
resinsight.set_main_window_size(width=800, height=500)
resinsight.set_plot_window_size(width=1000, height=1000)
# Retrieve first case
case = resinsight.project.cases()[0]

View File

@@ -253,7 +253,19 @@ class Instance:
width | Width in pixels | Integer
height | Height in pixels | Integer
"""
return self.__execute_command(setMainWindowSize=Cmd.SetMainWindowSizeParams(
return self.__execute_command(setMainWindowSize=Cmd.SetWindowSizeParams(
width=width, height=height))
def set_plot_window_size(self, width, height):
"""
Set the plot window size in pixels
Parameter | Description | Type
--------- | ---------------- | -----
width | Width in pixels | Integer
height | Height in pixels | Integer
"""
return self.__execute_command(setPlotWindowSize=Cmd.SetWindowSizeParams(
width=width, height=height))
def major_version(self):