• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

macro "batch part number rename"

  • Thread starter Thread starter marcofa
  • Start date Start date

marcofa

Guest
on eng-tips I found the macro attached.
it should change the "number part" and make it equal to "file name" if I did not understand badly. would be useful for the "new from" on product, where the number part remains old and the file name becomes new.
because I can't use it, could someone try it and explain how to do it?
Thank you.
Mar
 

Attachments

su gtwiki ho trovato lo script che fà al caso mio, e cioè rinomina i "numeri parte" come il "nome file"
nel caso di product creato con il comando "nuovo da" i numeri parte non vengono cambiati, ma solo i nomi file.
eseguendo questo script dopo il comando nuovo da, si otterranno nuovi numeri parte coincidenti con i nuovi nomi file.
questo script è un catvba.
qualcuno potrebbe dirmi per favore come si lancia?
marco

partnumber renamer by file name

often, users will name the partnumber and file name differently.

to clear up some confusion,
the partnumber is the parameter that controls the catpart/catproduct name. it resides in the file and exists at the top of the digital project tree structure.
the file name is the title of the file, and it usually ends with ".catpart" or ".catproduct. it is only accessible from windows explorer or other directory structure interfaces. you can view a read-only version of this name in digital project under file > document properties > document.

in the process of developing an assembly, some users would like to coordinate differing the names. this script changes the partnumber to match the file name.

script download
click here to download the script.
http://www.gtwiki.org/mwiki/index.php?title=partnumber_renamer_by_file_name

important things to note
the changes are permanent. if you select a directory and choose the option to recursive cycle through all sub-directories, it will rename everything. there is no cancel or "stop script.
catproducts that hold onto changed catparts will lose the links. it's recommended that users only utilize this script for catpart directories, but the option is open.
when converting catproducts, you'll probably be prompted with the desk management dialog box. ignore this until the script has finished--it will not impact the performance of the code and you can cancel them all at the end of the procedure.
the equals sign (=) cannot be in the file name of a catproduct. you will be able to save the name, but the partnumber will not accept that string of characters. the script will not prompt you with an error and catparts allow equals signs in the file name and partnumber.
 
I would need the opposite, batch name the file name according to the part number. Obviously managing this change also on the links of the catproduct in which the parts are inserted.
Does anyone know if there's any suitable macros?
Thank you.
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top