Solved

Change solve NSQ parameter from pickup to fixed(off) using Macro

  • 7 December 2021
  • 2 replies
  • 297 views

I am looking for ZPL command which change NSQ parameter solve from pickup to fixed(off).

There is command SOLVETYPE and code PF_p to remove pickup for sequential but this option not available for NSQ parameter pick up. 

Any suggestion how to do so?

icon

Best answer by Jordan.Teich 17 January 2022, 16:01

View original

2 replies

Userlevel 7
Badge +2

Hi Harel,

 

I’m curious to know if there’s a ZPL solution to this. Probably not the answer you were looking for, but this is definitely something you can do with the ZOS-API. In the ZOS-API the NSC editor cells have a MakeSolveFixed() method. You could use a Python snippet like so:

TheObject = TheSystem.NCE.GetObjectAt(1)

TheObject.GetCellAt(12).MakeSolveFixed()

The parameters are from cell 11 (Parameter 1) and forward. In my example, cell 12 is Parameter 2.

Take care,

 

David

 

Userlevel 2
Badge +2

Hi Harel and David,

There is actually a ZPL solution to this as well!


In Non-Sequential, removing and setting solves works a bit differently.  While the command SOLVETYPE can be used in Sequential, setting/removing variables in NSC is handled by the keyword SETVAR. 


When setting the code for this script, Nn controls non-sequential component position data.  n can be set from 1-6 to refer the code to x/y/z positions and x/y/z tilts.  The code On controls non-sequential component parameter data where n is equal to the parameter number that the user wishes to adjust.
 
If you don't need to use SETVAR on a specific configuration, the syntax will be as follows: SETVAR surf, code, status, object
 
Note that in Non-Sequential mode, surf will always equal 1.  In non-sequential, the code will either be Nn or On.  If status=0, the variable status will be removed from a parameter and if status equals any other value, the parameter will made variable.  The object will refer to the object that you wish to adjust.
 
For example, if Object 2 in a non-sequential system has a pickup solve on the X position, you can remove it with the following code: 
 


 


If you have any further questions, please let us know and we will be happy to help! 

 

Best, 

Jordan

Reply