Jump to content
Developer Wiki and Function Reference Links ×

Activate a specific Resource


Recommended Posts

I'm notating a drawing and bouncing back and forth between two specific Data Tag Styles.  I'd like to script the process of selecting each of them so I can add the script to my workspace and associate a keyboard shortcut.

 

If I right-click on the Data Tag Style in the Resource Manager, it activates the tool with that style active.  This is what I'm trying to script.

 

My searching has failed to show any example of anyone trying to do this before.  Anyone have a suggestion as to how I'd approach it?

 

I've gotten close by making a PIO using symbol(), but that seems to only work with, you know, a symbol.

Link to comment

You are going to have to focus on the tool's preferences which are likely stored in an attached data resource. Perhaps it is possible to pre-set a couple of styles (if they don't already exist in the drawing file), then swap the names in and out of a "style field" in that resource. Assuming a style field exists. Data Tag Style changes might just be an embedded procedure that changes all the data fields and is only accessible when the Data Tag Preferences window is active.

Link to comment

Thanks Larry.  

I do have the two Data Tag styles I'm back and forth between in the drawing already.

 

Not sure where to start poking based on your suggestion -  "the tool's preferences which are likely stored in an attached data resource" Where can I find data resources attached to tools?  Good idea about passing text to wherever-that-is in order to change the active Data Tag Style.

 

 

I had looked at this bit of the screen too thinking it might lead to something - 

image.thumb.png.1a32b7b7b7622a1a56bcec6af855e7a8.png

My two styles pop up in that pull-down.  If I could work out how to automate selecting that, I'd be set!

 

CallToolByName() looks like a close Vectorscript function, but does not give me the option to pass along any tool preferences.  Continuing to dig around old posts and see if anyone else has tried similar...

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