Solved

"GetNSCPosition" is not recoganize in ZPL

  • 26 June 2020
  • 2 replies
  • 127 views

  • Anonymous
  • 0 replies

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.

icon

Best answer by Csilla Timar-Fulep 26 June 2020, 13:36

View original

2 replies

Userlevel 5
Badge +2

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