Rename Component part numbers

Rename Component part numbers

smithweyer
Contributor Contributor
981 Views
1 Reply
Message 1 of 2

Rename Component part numbers

smithweyer
Contributor
Contributor

I have a project file that I have messed up with several hundred brackets in the part names and I want to have a script to remove them and fix the naming so I can make up my bill of materials without manually going through the bill of materials or the file to fix them.. I did find a find and replace script for the component names although I'm not sure if its working properly and Id like to modify it or make a python version. I'm not much of a programmer but I can change values. lol

 

here is the link to the file it's called renameComp

www.cadstudio.cz/en/download.asp?ccat=33

 

thanks for any help.

 

 

0 Likes
Accepted solutions (1)
982 Views
1 Reply
Reply (1)
Message 2 of 2

smithweyer
Contributor
Contributor
Accepted solution

I modified the component.name parameter to component.partName and that seemed to work. The regular expression /(.* seemed to work to remove most of the crap, what expression would you use to remove a version number?

 

Thanks

0 Likes