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

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

Highlighted

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

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

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

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