Jason NS Posted May 2, 2020 Share Posted May 2, 2020 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 Quote Link to comment
Boh Posted May 2, 2020 Share Posted May 2, 2020 I haven’t learnt scripting but I have used the custom visibility/attributes tool to create some scripts for placing some often used symbols. Quote Link to comment
Pat Stanford Posted May 2, 2020 Share Posted May 2, 2020 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. Quote Link to comment
Sam Jones Posted May 2, 2020 Share Posted May 2, 2020 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? Quote Link to comment
Jason NS Posted May 3, 2020 Author Share Posted May 3, 2020 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.. Quote Link to comment
JBenghiat Posted May 4, 2020 Share Posted May 4, 2020 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. Quote Link to comment
Jason NS Posted May 4, 2020 Author Share Posted May 4, 2020 Thanks Josh Yea Lighting Instruments work fine shame about the truss insert tool.. Thanks guys. Quote Link to comment
Recommended Posts
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.