Skip to main content
Solved

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

  • December 7, 2021
  • 2 replies
  • 353 views

Harel.Shfaram

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?

Best answer by Jordan.Teich

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

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

2 replies

David.Nguyen
Luminary
Forum|alt.badge.img+2
  • Luminary
  • 1085 replies
  • December 7, 2021

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

 


Forum|alt.badge.img+2
  • Infrared
  • 24 replies
  • Answer
  • January 17, 2022

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


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