Quantcast
Channel: PTC Community: Message List - Windchill
Viewing all articles
Browse latest Browse all 8876

Re: How to update the Softtype attribute and OOTB attribute of WTDocument

$
0
0

public static void updateAttributesValues(Persistable object, String[] attributeNames, Object[] attributeValues) throws WTException

    {

        if(attributeNames.length != attributeValues.length)

        {

            throw new WTException("The length of attribute names array is not the same as the length of attribute values array");

        }

 

        LWCNormalizedObject lwcNormalizedObject = new LWCNormalizedObject(object, null, null, new UpdateOperationIdentifier());

        lwcNormalizedObject.load(attributeNames);

        for(int i=0; i<attributeNames.length; i++)

        {

            lwcNormalizedObject.set(attributeNames[i], attributeValues[i]);

        }

        lwcNormalizedObject.apply();

    }


Viewing all articles
Browse latest Browse all 8876

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>