Ben3B Posted November 5, 2024 Share Posted November 5, 2024 Hello :) components of symbols are "often" maybe always with local attribut instead of by class... Is a quickly way to put it by class ? the only way I've found is to edit the component select all and put all attribut by class so is a tick box such as for the class to put all attribut by class when you import the symbol? Or, as I do for now, the only way is to edit all symbol put the attribut by class and record it, and next time import that symbol instead of this one comming from vectorworks library ? Atribut par style de classe 2024-11-05 111225.mp4 Quote Link to comment
Ben3B Posted November 7, 2024 Author Share Posted November 7, 2024 The french support answer me that I've to build a script ... Someone can help me ? I need a script that edit 2d components, select all put attribut by class and edit 3d components, select all put attribut by class thanks !!! Quote Link to comment
Pat Stanford Posted November 9, 2024 Share Posted November 9, 2024 Take a look at these posts by @MullinRJ and @Jesse Cogswell to give you a starting point. Maybe me tagging them here might cause them to appear and have what you need. Quote Link to comment
Jesse Cogswell Posted November 10, 2024 Share Posted November 10, 2024 Do you need this as two separate scripts, one doing 2D geometry and one doing 3D geometry, or are you looking for a script to do both at the same time? If you want to happen to ALL geometry in a symbol at once, it's actually pretty easy. Doing them separately gets a little trickier, but is still doable. Quote Link to comment
MullinRJ Posted November 10, 2024 Share Posted November 10, 2024 @Jesse Cogswell, I have a script, but I'm having trouble posting the file. Will try again later this afternoon. Raymond 1 Quote Link to comment
Ben3B Posted November 12, 2024 Author Share Posted November 12, 2024 On 11/10/2024 at 7:30 PM, Jesse Cogswell said: Do you need this as two separate scripts, one doing 2D geometry and one doing 3D geometry, or are you looking for a script to do both at the same time? If you want to happen to ALL geometry in a symbol at once, it's actually pretty easy. Doing them separately gets a little trickier, but is still doable. I'm looking for a script to do both at the same time :) thanks a lot ! Quote Link to comment
Jesse Cogswell Posted November 13, 2024 Share Posted November 13, 2024 @Ben3B I had some time this evening, so I wrote a script for you. Please keep in mind that this is very lightly tested, so do please let me know if it doesn't work as expected. Running the menu command will open a dialog box listing all of the Symbols found in the drawing, sorted by Symbol Folder (marked "-" if not placed in a folder). You will need to select which symbols you would like set By Class by placing a check mark in the Select column. There is a button to Select All as well as a button to Select None. When you press the OK button, all of the geometry within the chosen symbols will have the fill pattern, fill color, pen style, pen color, opacity, and lineweight set By Class. This tool will not set markers or Text Style By Class. Attached to this post is a .vsm file called Set Symbols By Class.vsm. It should work with all versions of Vectorworks 2019 or newer. You will need to install this plug-in and put it into your workspace by following the instructions below: Download the attached .vsm file to a handy place. Open up your User Folder in an Explorer or Finder window. The quick and dirty way to get to this is to open up the Vectorworks Preferences, go to the User Folder tab, and press the button marked Explore (Windows) or Open in Finder (Mac). Place the downloaded file within the Plug-ins folder of the User Folder. Restart Vectorworks. Once restarted, go to Tools - Workspaces - Edit Current Workspace. Select the Menus tab. In the box on the left, find and expand the category named JNC. In the box on the right, find a menu to place the command in, such as Edit, Modify, or Tools. Click and drag the Set Symbols By Class command from the box on the left to the desired menu in the box on the right. Press OK. When I have a bit more time, I will flesh this out a bit with the ability to select which attributes to set and will add separate columns for choosing 2D or 3D geometry (there are many symbols from the Vectorworks library that I always want to set 2D by class but want to leave 3D as is). Oh, I should also mention that if you want to localize the plug-in to your native language, you can totally do that. To do so, follow these instructions (in English, so things might be labeled differently): Go to Tools - Plug-ins - Plug-in Manager. Click on the Third-party Plug-ins tab. Select the Set Symbols By Class command. Press the Customize button. Select the Strings tab. Double-click one of the three categories. Double-click any of the strings listed and enter your preferred text. Press OK. Once you've updated all of the strings you desire, press OK until you are back in the Plug-in Manager, then press Close. The strings are divided up into three categories: 3000 - Dialog Strings These are strings that make up the elements of the dialog box. Any and all of these can be changed. 4000 - Dialog Help Strings These are strings that populate the Help Box at the bottom of the dialog when you hover over dialog elements with your mouse. These can also be freely changed. 5000 - Misc Strings These are assorted strings such as alerts and image locations. You may change the following: 5002 - This what will appear in the Symbol Folder column when a symbol is not inside a folder 5003 - This is a warning that will appear if no Symbol Definitions are found in the drawing 5004 - This is an alert that will pop up displaying the total number of symbols that have been updated. This should start with an empty space. Please refrain from changing strings 5000 and 5001 unless you'd rather have some other icon than a checkbox in the Select column. Should be changed only if you really know what you are doing. Hopefully this script does everything that you need for the moment and doesn't break anything. Let me know if it does and I'll get it fixed as soon as I can. Set Symbols By Class.vsm Quote Link to comment
Ben3B Posted November 13, 2024 Author Share Posted November 13, 2024 On 11/10/2024 at 9:10 PM, MullinRJ said: @Jesse Cogswell, I have a script, but I'm having trouble posting the file. Will try again later this afternoon. Raymond Here is the script, I just test it works well, but it dont put the texture by class time to test @Jesse Cogswell solution now, I'll be back in few time Set ALL Attributes ByClass.zip Quote Link to comment
Ben3B Posted November 13, 2024 Author Share Posted November 13, 2024 Thank @Jesse Cogswell it works well thanks for your time ! there is the same limit as in the @MullinRJ script, it doesn't put the texture by class . I often use the texture by class, for example for the speakers: in all my files there are green in 2d plot and 3d wireframe, but black in shaded with a black texture applied to cabinets and grill texture to grill... It is pretty easy and quick as soon as the symbols are well build with different class for cabinet and grill ;) Quote Link to comment
Jesse Cogswell Posted November 13, 2024 Share Posted November 13, 2024 Good call. Texturing with script can get very complicated depending on texture parts (such as texture overrides by face), but I've added the ability for my script to set the overall texture By Class. Depending on how your symbols are textured, this should work. Unfortunately there is no code that I know of to poll the number of texture parts for an object, so setting overall is the best that I can do at the moment. Set Symbols By Class.vsm 1 Quote Link to comment
Ben3B Posted November 14, 2024 Author Share Posted November 14, 2024 unbelievable, it works ! it s easy ! it will make me win a lot of time !!! Thank you all !!! 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.