Jump to content
Developer Wiki and Function Reference Links ×

Batch rename resources


tca

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
Link to comment
  • Marionette Maven

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
Link to comment

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

Link to comment
  • 1 month later...
  • Vectorworks, Inc Employee
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?

Link to comment

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

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...