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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Is it possible to update CAD Document Attribute with java Code ?

ManikandanVelay
1-Newbie

Is it possible to update CAD Document Attribute with java Code ?

I want to update the value of Attribute CAD Document using Code without CADClient.

I need it for Creo Part file and Auto CAD file

1 REPLY 1

Hello!

Maybe you can try the below code (in this case written for master attributes):

EPMDocumentMaster master = getMaster();

String attributeName = "MyAttribute";

String newValue = "MyNewAttributeValue";

LWCNormalizedObject lwcObject = new LWCNormalizedObject(master,null,Locale.US,new UpdateOperationIdentifier());

lwcObject.load(attributeName);

lwcObject.set(attributeName, newValue);

lwcObject.apply();

PersistenceHelper.manager.modify(master);

Best regards,

Peter

Top Tags