Jump to content

Custom Tool point of insertion

Recommended Posts



I'm making a custom tool that places text, with data attached, onto the drawings.


If the user picks a point on the drawing, how do I determine where that is? How do you get feedback from the tool?


Share this post

Link to post

The click to insert the object into the drawing will be the origin (0,0) of everything you code inside the object. Just like in a symbol.

You can get a handle to the PIO with GetCustomObjectInfo. Then you can get the coordinates of the insertion point with GetSymLoc3D.

Share this post

Link to post

That could help if I needed to move the text from 0, 0 at a later stage ☺️


But I would like to know where to move it. I would like to know where the user clicked to place the text.


If the tool was set up with parameters (eg. x1 - X Coordinate, y1 - Y Coordinate), would the recordHandle record them and how do I get them out?


Share this post

Link to post

Check out the User Interactive procedures in the Function Reference. Specifically the one you probably want is:





) ;


This returns the X and Y coordinates of the position the user clicked at. Use that as the insertion point for your object.

Share this post

Link to post

That's too simple, but it works ☺️


I tried MouseDown without luck to I thought it needed some Tool command.




Share this post

Link to post

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.

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.


7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114


© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

  • Create New...