Skip to main content

I cannot get the Tilt About X or Y to insert new tilt angle.  And I would like to read from a .txt to do the same but cannot get the write method to initially set or change the Tilt About X - here is some of my code.



TheLDE = TheSystem.LDE;


%TheLDE.InsertNewSurfaceAt(2);


%TheLDE.InsertNewSurfaceAt(12);


%TheLDE.InsertNewSurfaceAt(5);



Surface_12 = TheLDE.GetSurfaceAt(12);


%Surface_5 = TheLDE.GetSurfaceAt(5);



TheLDE.GetSurfaceAt(12).TiltDecenterData.BeforeSurfaceOrder = ZOSAPI.Editors.LDE.TiltDecenterOrderType.Decenter_Tilt;


TheLDE.GetSurfaceAt(12).TiltDecenterData.BeforeSurfaceTiltX = 5;


TheLDE.GetSurfaceAt(12).TiltDecenterData.AfterSurfaceTiltX = -5;


 

Hi



I tested your code in Matlab with the Interactive extension and it works for me. I just opened an empty sequential system, added lines to the editor until I had a surface 12. Then I typed this code:



TheApplication = MATLABZOSConnection(7);


TheSystem=TheApplication.PrimarySystem;





TheLDE = TheSystem.LDE;


Surface_12 = TheLDE.GetSurfaceAt(12);


Surface_12.TiltDecenterData.BeforeSurfaceOrder = ZOSAPI.Editors.LDE.TiltDecenterOrderType.Decenter_Tilt;


Surface_12.TiltDecenterData.BeforeSurfaceTiltX = 10.0;


Surface_12.TiltDecenterData.BeforeSurfaceOrder = ZOSAPI.Editors.LDE.TiltDecenterOrderType.Tilt_Decenter;


Surface_12.TiltDecenterData.AfterSurfaceTiltX = -5.0;


As a result I have:





Let me know how you are running your test.



Sandrine


Thank you - yes, It worked for a new instance - I guess I meant the TitlAboutX, and TiltAboutY - wanted to see that change - but surface_12 object does not support that method/property- i tried:



Wanted to see the LDE TiltAboutX and Y change to these parameters:



%TheLDE.GetSurfaceAt(12).TiltAboutX = 5


%TheLDE.GetSurfaceAt(12).TiltAboutY = 4



 



but did not see the LDE change - maybe it takes a different property or namespace but I cannot find it.


Could you try in the interface? Because some surfaces can not have a coordinate break just after, so maybe that is why you can't do it. 



Or would be able to send a screenshot of surfaces 11, 12 and 13?


Reply