Skip to main content
Question

Unable to set up diffraction DLL for User Defined Object in non-sequential mode

  • July 1, 2025
  • 1 reply
  • 20 views

ztystar

Hi all,

 

I am trying to use ZOS API to assign the diffraction-based dll for the User Defined Object in Non-sequential mode. I have tried normal ‘Diffraction Grating’ object and it works good, however, for the User Defined Object, it did not work. Could anybody share some insights for me? Thank you!

 

Part of the code for normal ‘Diffraction Grating’ object: (This works!)

TheNCE.InsertNewObjectAt(1);

o1 = TheNCE.GetObjectAt(1);

o1.ChangeType(o1.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.DiffractionGrating));

o1.DiffractionData.Split=ZOSAPI.Editors.NCE.DiffractionSplitType.SplitByDLL;

o1.DiffractionData.DLL='srg_trapezoid_RCWA.DLL';

o1.DiffractionData.StartOrder=-1;

o1.DiffractionData.StopOrder=1;

 

Part of the code for ‘User Defined Object’: (This  does not work!)

TheNCE.InsertNewObjectAt(1);

o1 = TheNCE.GetObjectAt(1);

o1.ChangeType(o1.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.UserDefinedObject));

o1.Comment = 'DiffractionGrating.DLL';

o1.DiffractionData.Split=ZOSAPI.Editors.NCE.DiffractionSplitType.SplitByDLL;

o1.DiffractionData.DLL='srg_trapezoid_RCWA.DLL';

o1.DiffractionData.StartOrder=-1;

o1.DiffractionData.StopOrder=1;

1 reply

ztystar
  • Author
  • Infrared
  • 9 replies
  • July 1, 2025

Problem solved !


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