cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Code for renaming EPMDoc Number and Filename

SOLVED
Highlighted
Garnet

Code for renaming EPMDoc Number and Filename

I'm using the code shown in PTC CS150421 to rename (number and filename) for CADDocs.

EPMDocumentMasterIdentity masterIdentity = (EPMDocumentMasterIdentity)master.getIdentificationObject();

masterIdentity.setNumber(number);

IdentityHelper.service.changeIdentity((Identified) master, masterIdentity);

master = (EPMDocumentMaster) PersistenceHelper.manager.refresh(master);

WTKeyedMap docCadNameMap = new WTKeyedHashMap(1);

docCadNameMap.put(master, cadname);

EPMDocumentHelper.service.changeCADName(docCadNameMap);

The problem I'm having is when opening in Pro/E, I get file cannot be retrieved. I see downloaded successful and see it in the workspace. The number and filename all show the new name in the PDMLink UI. Even the filename on the content tab updates.

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Code for renaming EPMDoc Number and Filename

I found the answer and thought I would post it for anyone else struggling with this. The filename (cadname in the code) has to be lower case and 31 characters or less (35 with filename extension). The answer is actually in PTC article CS110903.

1 REPLY 1

Re: Code for renaming EPMDoc Number and Filename

I found the answer and thought I would post it for anyone else struggling with this. The filename (cadname in the code) has to be lower case and 31 characters or less (35 with filename extension). The answer is actually in PTC article CS110903.

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum! ______________________________ Check out the Windchill Tips Board! We're talking about Whirlpool's use of digital twin, augmented reality, and data-driven design!

The NAVIGATE WORKING GROUP is here! Come innovate with PTC!

Sign up for a Working Group