Skip to content

What zospy type for ZOSAPI.Tools.RayTrace.OPDMode? #53

Closed Answered by crnh
mitkoge asked this question in Q&A
Discussion options

You must be logged in to vote

Hi! First, thank you for using ZOSPy!

There are two ways to access ZOS-API constants from ZOSPy, and your method is one of them. zp.constants.Tools.RayTrace.OPDMode[0] will give you ZOSAPI.Tools.RayTrace.OPDMode.None.

Alternatively, and this is the preferred way, you can use zp.constants.Tools.RayTrace.OPDMode.None_ (note the underscore at the end). ZOSPy's constants are designed to reflect the behavior of the ZOS-API Enums as much as possible, so you can just access their values as attributes, e.g. ZOSAPI.Tools.RayTrace.OPDMode.Current. However, this is not possible with None, because that name has a different meaning in Python. We therefore suffixed all occurences of None with an unders…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by crnh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants