Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rename CATIA V5 Product and Parts 2

Status
Not open for further replies.

ghizzo

Mechanical
Nov 27, 2015
10
Hi to everyone.

I've a problem, i need to rename an assembly (and all sub-assembly and parts) changing only a the first part of the name.

EX :

all my files start with a code of 7 numbers, i need to change only this 7 numbers in all files

1234567_aaa.catproduct
1234567_bbb_catpart
1234567_ccc_catproduct
1234567_ddd_catpart

must become

7654321_aaa.catproduct
7654321_bbb_catpart
7654321_ccc_catproduct
7654321_ddd_catpart


There's a way (macro ??) to speed up the saving of these files ?

Thank you !
 
Replies continue below

Recommended for you

Hello SachinTata and Everyone
Thanks to forum member
I mean,
Change the name of Part & Product that start by Non-Number:
ABC****=Dce***
but this code :
ABC*** => dce***
Pleas help me for Non-Numbers in name
Best Regards
 
got it itsmyjob

@3DPLM
remove LCase from the replace string and use vbTextCompare as argument, then you will get the desired result

check below lines

objFIns.Name = Replace(objFIns.Name, FstStr, SndStr, , , vbTextCompare)
objFIns.PartNumber = Replace(objFIns.PartNumber, FstStr, SndStr, , , vbTextCompare)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor