Andy Broomell Posted March 9, 2020 Share Posted March 9, 2020 Is there a way to set a Title Block Border object to always insert onto a particular class once it's been saved as a Style in the Resource Manager (like a red symbol)? For example with regular symbols, under Symbol Options you can choose a class for that symbol to always insert onto. How can I do that with a TBB Plug-In Style? Currently it always inserts onto the active class. @Nikolay Zhelyazkov Quote Link to comment
Boh Posted March 9, 2020 Share Posted March 9, 2020 I don’t think you can. I don’t know if it works for titleblock border styles but for detailer styles if the detailer object is on a particular class when the detailer style is created then it will insert into that class when dragged in from the RM. TBB styles are a bit different however so not sure it would work wth them. 1 Quote Link to comment
Boh Posted March 9, 2020 Share Posted March 9, 2020 As I always have "none" as my active class a workaround which I use to quickly assign selected objects to a class is to use a script. I have several of them in an "Assign Class" script palette. This one assigns objects to the none class but you can easily edit it to make it assign objects to the titleblock class if you wish. Just change the third line. Procedure SetTheClass; CONST kCName = 'None'; VAR gh1 : HANDLE; Function DoIt(h1 : HANDLE) : BOOLEAN; BEGIN SetClassN(h1, kCName, True); END; BEGIN Locus(0, 0); gh1 := LNewObj; ForEachObjectInList(DoIt, 2, 2, FInGroup(GetParent(gh1))); DelObject(gh1); END; Run(SetTheClass); Quote Link to comment
Vectorworks, Inc Employee Nikolay Zhelyazkov Posted March 10, 2020 Vectorworks, Inc Employee Share Posted March 10, 2020 Hello @Andy Broomell, @Boh is right. If you create new TBB style out of a TBB assigned to a class, when you insert objects of that style from the RM they are assigned to the specified class and not the active class. However, this works only for drag & drop from the RM. Creating the styled TBB from the tool takes the active class. Best Regards, Nikolay Zhelyazkov 1 Quote Link to comment
grant_PD Posted March 10, 2020 Share Posted March 10, 2020 @Boh love that script you posted! Do you know of any way to make the script work on all nested objects in the selection? Like if I had a group or symbol with different classes could I run script to make everything in that group or symbol go to the desired class? Quote Link to comment
Andy Broomell Posted March 10, 2020 Author Share Posted March 10, 2020 (edited) 7 hours ago, Nikolay Zhelyazkov said: However, this works only for drag & drop from the RM. Interesting that it only applies to drag & drop and not double click insertion. Good to know, thank you! For what it's worth, my goal is simply to set up a template for others to use that's hard to mess up. I actually just leave TBBs on the None class, but in some other people's files I've recently seen a number of TBBs on the Dimension class (which was surely Active when the TBB was inserted) and therefore the borders were blue 😅 Edited March 10, 2020 by Andy Broomell Quote Link to comment
Boh Posted March 10, 2020 Share Posted March 10, 2020 3 hours ago, grant_PD said: @Boh love that script you posted! Do you know of any way to make the script work on all nested objects in the selection? Glad you are finding it useful. Credit for the script goes to @Julian Carr who kindly wrote it for me. Sorry I’m not a scripter so i have no idea how to edit it beyond changing the class it assigns to. I think there may be a script out there already that does something like what you want. . 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.