NET::methodargs: Improper arguments supplied for method named NewUAnalysis.
Thanx and BR,
Jozef
Page 1 / 1
Hi Jozef,
The NSC Shaded model is only available if TheSystem is currently a non-sequential system. By default, new systems are sequential mode. Can you confirm your system is non-sequential (I don’t use Mathematica so I’m not sure if the code below has the correct @ & double quotes):
For using a command with an enumerated input within Mathematica, you must first load the enum via the LoadNETType command. For example, the enum for the NSC Shaded Model is “ZOSAPI.Analysis.AnalysisIDM”, so I will enter that as shown below:
LoadNETTypeE"ZOSAPI.Analysis.AnalysisIDM"];
Once loaded, you can choose the enumerator you wish to use by using the ` operator and the final section of the enum value. (That operator is the key to the left of the “1” and above “Tab” on a typical keyboard.) For example, to select NSC Shaded Model with the ZOSAPI.Analysis.AnalysisIDM enum loaded, we would use this command:
As long as the enum is loaded somewhere in the document (and evaluated), you can call any enumerator value from its list using the ` operator. This is exemplified in Sample 3 from within the C:\...\Zemax\ZOS-API Sample Code\Mathematica folder, where we insert optimization operands into the Merit Function Editor using the MeritOperandType enum.
Let me know if you have any other questions about this!