I’m having trouble setting the reference to Chief Ray via the API for a Geometric Image Analysis
below is what I have in Matlab, everything works but the highlighted line
Any help will be greatly appreciated!
I’m having trouble setting the reference to Chief Ray via the API for a Geometric Image Analysis
below is what I have in Matlab, everything works but the highlighted line
Any help will be greatly appreciated!
This works for me in Python:
geom = TheSystem.Analyses.New_GeometricImageAnalysis()
settings = geom.GetSettings().__implementation__
settings.Reference = ZOSAPI.Analysis.Settings.ReferenceGia.ChiefRay
geom.ApplyAndWaitForCompletion()
Ignore the __implementation__
, this is a peculiarity of Pythonnet I believe. The line:
settings.Reference = ZOSAPI.Analysis.Settings.ReferenceGia.ChiefRay
Should work in MATLAB. Whenever a setting is implemented as a drop-down menu in the user interface, you should expect that an Enumeration is used in the ZOS-API. This means, the corresponding setting is probably not a string such as “Chief Ray”
. Instead, it should be coming from a list of predefined values.
Also, in your code you wrote ReferenceGia
, this is a type, the property is Reference
. I hope this helps.
Take care,
David
Thank you for the support, your example works in Matlab.
I appreciate you explaining the enumeration for the drop downs.
Thanks again!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.