Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
Photonics

Photonics

Topics related to Lumerical and more.

Getting Error “In set, the requested object number is out of range”

    • mwhitby
      Subscriber

      Here is the part of the code giving me the error:

      h =1;

      SiO2_thick_range = [.5e-6, 2e-6];

      SiO2_thick_max = SiO2_thick_range(2);

      SiO2_thick_min = SiO2_thick_range(1);

      SiO2_thick_diff = SiO2_thick_max - SiO2_thick_min;


      SiO2_thick = SiO2_thick_min +0.1*h*SiO2_thick_diff;

      electrode_thick = 0.1e-6;  


      sidewall = SiO2_thick - 2*electrode_thick;

        z_center_point = electrode_thick + sidewall/2;

        set("left sidewall","z",z_center_point); #THIS IS THE LINE THAT GIVES THE ERROR

      I'm really confused why I'm getting this error since z_center_point = 0.325 and sidewall = 0.45. So the problem is not negative values. I tried entering these values directly into the edit window and it worked fine. I need to get this to work in the code though.

      I FIXED THIS

      My problem was that I had forgotten to use "setnamed" insteat of "set" (*facepalm*). This Is fixed now.

    • Guilin Sun
      Ansys Employee
      You are right that "set" is used when an object is selected, no need to mention its name. Whereas "setnamed" will specify the object name.
Viewing 1 reply thread
  • The topic ‘Getting Error “In set, the requested object number is out of range”’ is closed to new replies.
[bingo_chatbox]