Jump to content
Developer Wiki and Function Reference Links Read more... ×

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


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.