Skip to main content
Solved

change surface settings in spot diagram by ZOSAPI MATLAB

  • July 7, 2021
  • 1 reply
  • 150 views

I tried to change surface setting in spot diagram by ZOSAPI MATLAB and get spot position info by the following commands in MATLAB: 

spot.ApplyAndWaitForCompletion(); 

spot_results = spot.GetResults();  

spot_results.SpotData.GetReferenceCoordinate_X_For (2,1)

spot_results.SpotData.GetReferenceCoordinate_Y_For (2,1)

Which command should I use to fulfil this task?? 

 

Best answer by David.Nguyen

Hi Shih-Heng,

Standard spot diagram has its settings implemented in the ZOS-API.

The lines of code you need are

MySettings = spot.GetSettings();
MySettings.Surface.SetSurfaceNumber(5)

Those should be before you use ApplyAndWaitForCompletion, and after you've created the analysis. Replace the number 5 by whatever surface you wish to apply.

Hope this helps.

Take care,

David

 

View original
Did this topic help you find an answer to your question?

David.Nguyen
Luminary
Forum|alt.badge.img+2

Hi Shih-Heng,

Standard spot diagram has its settings implemented in the ZOS-API.

The lines of code you need are

MySettings = spot.GetSettings();
MySettings.Surface.SetSurfaceNumber(5)

Those should be before you use ApplyAndWaitForCompletion, and after you've created the analysis. Replace the number 5 by whatever surface you wish to apply.

Hope this helps.

Take care,

David

 


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