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!

Part number already exists in session renaming error

Status
Not open for further replies.

JayEnn1

Automotive
Sep 29, 2015
50
US
Good morning,

I have written a CatiaV5 2012 CatScript that loops thru a design tree and renames parts and products based upon various criteria.
There is one error of which I cannot figure out how to handle. "Part number already exists in session."

Can anybody provide a clip of code as an example of how to error trap this condition?
Looking for something like: If error, then assign a dummy name and don't bail

This is the line of code that the macro bails on if new part number already exists in session.
MyObject.Products.item(InstanceCount).PartNumber = NewPartNum

Any help would be great!
Thanks
Tom
 
Replies continue below

Recommended for you

Can you provide a link to the solved discussion?
Thanks!
 
download.aspx


Eric N.
indocti discant et ament meminisse periti
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top