Jump to content

Renaming Classes with Multiple Subclasses, selecting all objects on a class


Recommended Posts

Is there a way to rename a class with multiple subclasses?  For example I have just imported a civil engineer's CAD survey and it has hundreds of classes with subclasses, all using standard abbreviations.  Unfortunately the file was a mess and most of the information will just be deleted.  There are some classes I would like to keep and rename more legibly, but I'd rather not individually change the base class name ten times.

 

In a related vein, some of the imported linework is at an accurate height, but a lot of it has seemingly random height values, like tree symbols, leader lines, and text notes sitting a quarter mile up above the topography.  Is there a way to select all items on a class (other than just turning all other classes invisible, and selecting what's left).  In Rhino if you do a Select All Objects On Layer (Rhino layer being comparable to VW class) command, it would warn you that some items of that description were not currently visible and prompt to turn on.  That's the functionality I'm trying to recreate.

Link to comment

@MarcelP102 is correct, this plug-in will work on any named object, including classes and layers.  It makes renaming classes and removing parent classes really simple.

 

To install, follow the instructions below:

  1. Download attached .vsm file
  2. Find your User Folder.  The quick and dirty way to do this is to go to your Vectorworks Preferences, go to the User Folder tab, then click on Explore / Open in Finder.  This will open your user folder in a separate window.
  3. In the explorer/finder window, find the Plug-ins folder and open it.
  4. Move the downloaded .vsm file into the Plug-ins folder.
  5. Restart Vectorworks.

Now, you will want to add the menu command to your workspace.

  1. Go to Tools - Workspaces - Edit Current Workspace.
  2. Make sure that the Menus tab is selected.
  3. In the box on the left, expand the category JNC, you should see a command called Replace Name Text.
  4. In the box on the right, find a menu where you want to access the command (such as Tools).
  5. Drag and drop the command from the box on the left to the box on the right.
  6. Click OK.

The tool allows you to have only look at selected objects (for renaming Viewports, for example), and the list browser is automatically sorted by object type.  It looks at Plug-in Objects, Layers, Classes, anything with a name aside from Symbol Folders (there is a bug where changing the symbol folder name with a script doesn't properly update the Resource Manager, so the folder essentially disappears, so I removed that possibility).  It will highlight whether the resulting change will cause a naming conflict with another resource as well.  You can leave the Replace With text box empty if you want to remove text.

 

image.png.496d70e60924fa7911f993ae13bf1f65.png

 

Please let me know if you have any questions.  I should also mention that this tool will work with any version of Vectorworks from 2019 to the current release (and presumably 2023, won't know until it releases).

Replace Name Text.vsm

Edited by Jesse Cogswell
  • Like 2
Link to comment

batch rename!  should have known.   Thank you.

 

Select Similar is not quite what I'm looking for because it requires that you are currently looking at an object in that class.  A problem I'm having is that I'll have just one class set to visible in the class list, and every layer (there are only two right now) set to Show/Snap/Modify, nothing locked, and no layers have any classes invisible, and nothing is visible or selectable on the screen (with cmd+A, zoom to fit objects).  So if there's anything on that class, it should be visible.  I right click on the class and delete it, and it asks what to do with items on that class, so something's hiding from me.  Basically what I need is to force visibility and selection on a class.

Link to comment

The best way to deal with AutoCAD engineering files with all those problematic conventions is to keep them in a separate file and reference into the file you are working with.  Just leave all those 500 classes alone.

 

To select objects globally in a certain class or classes, use "Custom Selection," which opens a dialog box allowing you to create a selection command for any number of parameters.  To turn on visibility of all classes, go the navigation palette, classes, and Alt+click on the left hand column of any item to turn all visible.

  • Like 1
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...