Jump to content
Developer Wiki and Function Reference Links ×

Script to select symbol in resource manager


Recommended Posts

Hi guys trying to make a script to select a symbol resource as a bit of a quick tool for most used symbols. 
 

is this the right direction 

at the moment it only selects the last used symbol not the one in the SetActSymbol line 

 

BEGIN 
PushAttrs;
IF NOT CallToolByName('InsertTruss') THEN CallTool(1);
SetActSymbol('Truss Straight GLP-Cosmic Truss F44100 400x400x1000');
PopAttrs;
END;

Thanks 

Link to comment

A couple of issues,  

 

1.  What do you think CallTool(1) is doing?  Take a look at the Vectorscript Appendix for a list of the valid selectors. Then start about -200.

 

2. It looks like you are trying to the a symbol preference for the Truss Insertion Tool. I don't think think that SetActSymbol does that. It will only set the  symbol to be inserted by the Symbol Insertion tool. I am not certain if there is a way to force the default for the Truss Insertion tool. Hopefully @Sam Jones or @JBenghiat can comment.

 

3. SetActSymbol (and your script) worked ok for me when I had a symbol with the proper name. Create a symbol with a much simpler name and try that first to make sure it works. Then go back to the long symbol name and make sure you have it typed exactly right.

 

Good luck and ask again if you are still stuck.

Link to comment
30 minutes ago, Pat Stanford said:

2. It looks like you are trying to the a symbol preference for the Truss Insertion Tool. I don't think think that SetActSymbol does that. It will only set the  symbol to be inserted by the Symbol Insertion tool. I am not certain if there is a way to force the default for the Truss Insertion tool. Hopefully @Sam Jones or @JBenghiat can comment.

Whenever Josh and I are mentioned in the same breath, I yield to Josh.  Looking at the way the Truss Insertion Tool works with resources, I doubt if there is a way to set a default symbol.  I'm almost positive the Truss PIO and its insertion tool are SDK, part of Braceworks development, not vectorscript creations.  I think Favorite files and Templates are the closest you will get to speeding up the workflow.  Josh?

Link to comment

Thanks Guys for your help. 
So i used the SetActSymbol with another Resource and worked exactly as i expected it to what is great. 

Still issues with Truss as Josh mentioned im guessing this is because its part of the truss insertion tool what is kinda annoying. 

I made a few scripts for different types of resources like light fittings and also some for truss at different lengths. all the light fittings worked but when going through the scripts for the different lengths of truss it just selected the last used length of truss not the length in the script.. 
 

Link to comment

The Lighting Instrument Tool will take advantage of the active symbol, so that may work for the script. The Insert Truss tool is separate from the Truss object, so there isn't really any way to  manipulate the defaults.

 

Your best option is going to be to put your preferred truss symbols in a favorites file.

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