I have a script that prints a simple line of text with the XY dims of a mouse click. It works great on my drawing layer. I'm wondering if it's possible to have this same functionality inside a viewport under edit annotations. Changing the origin using the set origin tool doesn't work because it seems to use the sheet layer scale instead of the scale from the layer that the viewport is referencing.
Thanks.
For reference my script is below.
PROCEDURE XYloc;
VAR
X, Y : REAL;
X1, Y1 : REAL;
BEGIN
GetPt(X,Y);
REPEAT
UNTIL MouseDown(X1,Y1);
TextOrigin(X1, Y1);
BeginText;
Concat('X:',Num2StrF(X),' Y:',Num2StrF(Y))
EndText;
END;
RUN(XYloc);