Does anyone have an example of setting pickups via the ZOS api in NSC mode?
for i in obj_list:
obj = NCE.GetObjectAt(i)
obj.Xposition.SetPickupfromObject(1) ??? something like this
I have over 100 lines in the editor I’d like to set to pickup a position off of an existing object, and manually clicking all of them is tedious.
Best answer by David.NguyenView original
Sorry for my short reply. I have to do many clean-ups before I go for vacation.
Here is a sample code for sequential mode. You can find something similar in non-sequential.
surf3 = TheSystem.LDE.GetSurfaceAt(3)
surf6 = TheSystem.LDE.GetSurfaceAt(6)
ParameterPickup = surf6.GetCellAt(12).CreateSolveType(ZOSAPI.Editors.SolveType.SurfacePickup)
ParameterPickup._S_SurfacePickup.Surface = 3
ParameterPickup._S_SurfacePickup.ScaleFactor = -1
The code is part of sample code 7
@yuan.chen‘s answer, here is a more specific code:
You can pick-up from other columns, and you’ll find the available ones in the Syntax Help File:
Let me know if this helps. Take care,
Thank you both for the quick response.
This is exactly the syntax I was looking for.