Solved

how to Ignore Surface in API

  • 3 February 2022
  • 4 replies
  • 264 views

Userlevel 3
Badge

I’m still new to the API and having trouble getting and setting the “Ignore this surface” via the API.

I’m working in Matlab and trying:

TheLDE.GetSurfaceAt(4).GetSurfaceTypeSettings(ZOSAPI.Editors.LDE.ILDETypeData.IgnoreSurface)

but get the error:

The property 'IgnoreSurface' in class 'ZOSAPI.Editors.LDE.ILDETypeData' must be accessed from a class instance because it is not a Constant property. 

Can someone point me in the right direction?

Thank you,

John

icon

Best answer by Jeff.Wilde 4 February 2022, 07:33

View original

4 replies

Userlevel 7
Badge +3

Try this to flip the IgnoreSurface switch from Off (0) to On (1) :

surf4 = TheSystem.LDE.GetSurfaceAt(4);
surf4.TypeData.IgnoreSurface = 1;

Then you can see the results:

 

Userlevel 3
Badge

Excellent, this works. Thank you Jeff.

Hi, I would like to do the same but in non sequential mode. 

I tried this lines but it’s not working : 

        surf4 = TheSystem.NCE.GetObjectAt(4)

        surf4.TypeData.IgnoreObjects = 1

Do you know why and what I can do ? 

Thank you very much. 

Userlevel 7
Badge +3

See response here:

 

Reply