Skip to main content
Solved

Confusion about correponding command of 'Insert Object After' function and 'Show As' type.

  • July 19, 2024
  • 1 reply
  • 33 views

Borui

I have known that using command ‘ZOSAPI.TheSystem.NCE.InsertNewObjectAt(i)’can realize the function ‘Insert Object’, then I tried some commands but still cant find corresponding one for ‘Insert Object After’.

The other similar question is similar. I have known that using command ‘Det_Set1.ShowAs = ZOSAPI.Analysis.DetectorViewerShowAsTypes.GreyScale’can realize the function‘ can realize the function of setting ‘Show As’as ‘Grey Scale’, then ‘InverseGreyScale’and ‘CrossSectionRow’ dont work for corresponding functions.

Best answer by Benjamin.N

Hi Borui,

to my knowledge, the API does not provide a command for “insert object after”. This command is useful when working with the editor in the GUI. When you work with the API anyways, you can simply change “InsertNewObjectAt(i)” to “InsertNewObjectAt(i+1)”.

The correct names for the DetectorViewerShowAsTypes are “CrossSection_Row” and “GreyScale_Inverted”. 

I recommend you take a look at the ZOS-API syntax help document as described here: Navigating the ZOS-API Syntax Help document - Part 1 – Knowledgebase (zemax.com)

Best regards
Benjamin

View original
Did this topic help you find an answer to your question?

Benjamin.N
Forum|alt.badge.img

Hi Borui,

to my knowledge, the API does not provide a command for “insert object after”. This command is useful when working with the editor in the GUI. When you work with the API anyways, you can simply change “InsertNewObjectAt(i)” to “InsertNewObjectAt(i+1)”.

The correct names for the DetectorViewerShowAsTypes are “CrossSection_Row” and “GreyScale_Inverted”. 

I recommend you take a look at the ZOS-API syntax help document as described here: Navigating the ZOS-API Syntax Help document - Part 1 – Knowledgebase (zemax.com)

Best regards
Benjamin


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings