|
When post-processing results, you often want to compare two different models in the exact same position and size. The ‘Copy and Past Viewpoint’ feature allows you to set the same position and angle to display your model but, in addition to that, you might also want to have the exact same size for the two windows you are comparing. This would ensure that all the pictures in your report have the same original dimensions.
One new Python command will let you do that very easily.
This command is:
SetViewerSize(w,h)
where w is the width of the active viewer and h is the height.
To use it, you can click on the ‘Edit Python script’ icon:
Figure 1: 'Edit Python script' icon
In the new editor window, type: SetViewerSize(350,450)
Then click on one of the ‘Run script’ button to resize your window (Figure 2). The "!" button on the left runs the script using the current model. The "n!" button on the right starts a new model and runs the script using that new model.
Figure 2: 'Run script' buttons
This can easily be made a macro for frequent reuse. For that, save the short Python script with only this line in your working directory. Then, click on Tools/Macro and Rescan, you will then have a new macro available:
Figure 3: Macros panel
Now, just by clicking on that ‘resize’ button, your window will be resized to the dimensions you chose.
Here, we wrote a very short script, just one line, but of course, this command can be added to any Python script.
Regards,
Emmanuel Bot
ESI CFD Support Team
|