Skip to main content

I applied a solve on position z by 'SOLVETYPE'. Then I need to refer to the result of solve, i.e. the position os z. 



I am trying to using 'GETNSCPOSITION'. According to the EXTENSION DATA ITEMS, this should return the object position and angle and material. However, the viewer shows 'Unknown symbol GETNSCPOSITION.'



The similar command 'SETNSCPOSITION' works fine. But not the GETNSCPOSITION. It seems in the editor, it does not recoganize it as a legal command





Can anyone help something is wrong?



Thanks.

Hello Xin,



The problem is that GetNSCPosition is - as you said - an extension data item, not a ZPL keyword. Therefore, it cannot be used in a macro.



In order to get the position of an NSC object in a ZPL macro you need to use the numeric function NPOS():





To extract the z-position, you need to use code 3.



Best,



Csilla


Hi Csilla, this is great! Thanks a lot. 


Reply