07-31-2023 03:54 AM
Hi,
Just wondering if you know how to set the scaling (either X-axis and Y-axis) in a 2D plot in VIEW from a script? Many thanks in advance.
Regards,
Kane
Solved! Go to Solution.
07-31-2023 08:36 AM
Hello Kane,
per script the Y-axes in VIEW can be scaled manually via the properties YScalingBegin and YScalingEnd. For this to work, manual scaling must be enabled for the axis system. Either this is already set in the layout or you can also set the manual scaling per script via YScalingMode.
Dim oDisplayObj
Set oDisplayObj = View.Sheets("Seite 1").Areas("Area : 1").DisplayObj
'------------------- 2DAxisSystem ------------------------------
oDisplayObj.YScalingMode = "manual"
oDisplayObj.YScalingBegin = 1000
oDisplayObj.YScalingEnd = 2000
A very useful feature in DIAdem is the generation of script code. In many dialogs of DIAdem the settings of the dialog can be generated as script code. To do this you have to press the keys CTRL + SHIFT + C while the dialog is open. Then you will get code like I have pasted above. The code is on the clipboard and can then be pasted into a script. Have fun with it! :-).
Regards
AnJalpaka
08-01-2023 03:54 AM
Hi AnJalpaka,
It is exactly what I need. Thanks very much.
Regards,
Kane