Jump to content
Developer Wiki and Function Reference Links ×

XY script that works in a viewport's annotations


BlakeET

Recommended Posts

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);

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...