Skip to main content

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.

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