Jump to content
SamIWas

Scripting an object "pick up"

Recommended Posts

Posted (edited)

In certain Spotlight numbering operations and some AutoPlot tools, the cursor changes to a target of sorts, and can pick up symbols or snap to points.  Is there something in basic scripting that makes this happen?  I am not near the level of "event-based" scripting yet.  I have some scripts I want to write which would require this, but I don't know how to toggle it.

Edited by SamIWas

Share this post


Link to post

You could combine GetPt(x, y) to get the pickup point, h := PickObject(x, y) to get the object.

 

GetPt will also activate the target cursor.

Share this post


Link to post

The better tool to use is TrackObjectN()

It lets you use criteria to highlight valid objects.

  • Like 1

Share this post


Link to post

Sorry for not responding...started building a show.  I'll check these out soon!

Share this post


Link to post

TheTrackObject commands are what you want. Note that VS tools don’t run any code until the first click, so you can’t have a tool start out highlighting objects. It works great from  menu command or plug-in button or as a secondary action for a tool. 

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.

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.


 

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...