Jump to content
Developer Wiki and Function Reference Links ×

Script to directly select from a list of symbols?


synapse_gh

Recommended Posts

Hi folks,

 

Total VS noob here, and I may be asking something that turns out to be too simple for VectorScript?

 

I'm trying to automate some of the repetitive tasks in creating rigging drawings, and the end result I'm hoping to get to is a series of commands I can call from a StreamDeck, where each one lets me activate one of the 15 most-common symbols I use. This would be much faster than having to go back to the selection drop-down menu seven times when I want to create a 14-foot box truss on four motors.

 

So, for example, a button for each of 8' / 6' / 4' / 2' truss and another for a corner block, and a button for each of 2T / 1T / 0.5T hoist and a Truss Cross, etc.

 

I'm sure this must be possible, but am I overcomplicating things by trying to do this with VectorScript?

 

Thanks!

- G

Edited by synapse_gh
Link to comment

Yes, definitely possible. 

Use SetActSymbol() to set the active symbol definition.

SetTool(-209) will activate the symbol insertion tool.

You may want to check that your selected symbol is in the current document as well is import the symbols from a library file if they aren't. Otherwise, all you need is those two lines of code.

 

If you're on the Mac and have a utility that can execute an AppleScript from your SteamDeck, you can use DoScript to call those commands directly. Otherwise, for each, you'll need to create a custom menu command for each symbol, add to your workspace, assign a keyboard shortcut to each, and then call with the SteamDeck.

  • Like 2
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...