Skip to main content

API (Python): Removing Pickups and Variables globally for Non-Sequential Files

  • July 14, 2022
  • 1 reply
  • 280 views

Sven.Stöttinger
Forum|alt.badge.img

Hello everyone,

I was trying to find a simple way to remove pickups and variables for when I want to integrate a non-sequential system into another file. In the ZOS-API documentation I’ve found only a global removal for variables so far:

TheLDE = TheSystem.LDE
tools = TheSystem.Tools
tools.RemoveAllVariables()

Unfortunately, I was not able to find something similar for pickup-solves.
So, I’ve written a very small python-file based on the boilerplate code that removes pickups and variables from a nonsequential Zemax-File which I’d like to share to the community. The code only changes the solve types: variables and pickups to fixed solve types to preserve other solve types (for example the solve type “model” for materials).

 

Best regards,

Sven

 

 

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

1 reply

Forum|alt.badge.img+2

Hi @Sven.Stöttinger! I have moved your post to the Code Exchange because I think this is a good solution that can be used “nearly” as is by our users. It could be made into a user extension actually. Thank you.


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