Jump to content
Developer Wiki and Function Reference Links Read more... ×
tca

Batch rename resources

Recommended Posts

Hi,

 

Does anyone have a script that allows me to change the name of multiple resources (symbols, walls styles, hatches etc.) at once?

Preferably a search and replace kind of thing that works for all types of resources. Alternatively something that does this for one type of resource at a time.

I have found similar scripts for renaming or pre/suffixing class names...

 

thanks in advance.

Edited by tca

Share this post


Link to post

Here's a Marionette script that will allow you to batch rename resources using find and replace. Be aware that this also will query hidden records in your file, so be wary about that. (If you want to filter records out, they are type 47.)

You can further filter the list using the "Get Type" node to narrow down to Symbols, Gradients, Hatches, etc.

A list of object types can be found here: http://developer.vectorworks.net/index.php/VS:Function_Reference_Appendix#objects

 

This action should be undoable, but it's always recommended to use a copy of your file for testing since this is a destructive command. My advice would be to move the objects you plan to rename into their own Vectorworks file that you can later save as a resource library file.

MarionetteRenameResources_MFarrell.vwx

  • Like 1

Share this post


Link to post

Hi Marissa,

 

Thanks for the help, works great!

Still being a Marionette noob I was wondering where I would have to insert the "Get Type" node in order to allow me to select a certain type of resource to be renamed?

Preferably with a drop down list in the oip. I already got the old and new strings to display there..

 

 

Schermafbeelding 2019-01-18 om 14.31.54.png

Schermafbeelding 2019-01-18 om 14.32.53.png

Share this post


Link to post
On 1/17/2019 at 8:03 AM, tca said:

Hi,

 

Does anyone have a script that allows me to change the name of multiple resources (symbols, walls styles, hatches etc.) at once?

Preferably a search and replace kind of thing that works for all types of resources. Alternatively something that does this for one type of resource at a time.

I have found similar scripts for renaming or pre/suffixing class names...

 

thanks in advance.

@tca Could you please describe with some examples the types of rename or search/replace operations you are doing?

Share this post


Link to post

We organize our libraries in the same system (SfB) as our classes (and other construction documents). To keep things organized after importing standard library resources or resources from other files/parties we have to rename them. I was making some changes to the classification system so I needed to change a lot of resource names..

 

Schermafbeelding 2019-02-25 om 09.34.58.png

Share this post


Link to post

What do you typically do when you rename them? 

Add a prefix? a suffix? Anything else?

Share this post


Link to post

prefix, suffix or search a particular string and replace it...

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×