Skip to main content
1-Visitor
September 7, 2013
Question

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

  • September 7, 2013
  • 1 reply
  • 1180 views

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-Visitor
September 17, 2013

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