Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
I am trying to update display name and Description of classification node throgh API.
Please suggest possible ways.
Just out of curiosity, how many nodes to you have to update? Why not just manually update them?
we have a list of 400+ nodes which need to be created .
I have written a code which is able to create all node by reading excel in particular format. same is shown in above screenshot .But struggling to find a api to update displayname and description.
I was just trying to automate classification node creation through API,But I failed with windchill API.
I wrote a utility which is generating xml file which can run using loadfromfile and it create nodes under given parents.
I wrote a utility that allows me to enter a DataType and a value.
The utility will search the database and return the <Table.Column> following by the value.
I did this on a node Display Name and a node Description.
Once I know which table the data is stored in, I can easily write a utility to do the update.
Do you have a list of node names and the desired values for Display Name and Description.
If you would like me to write the utility email me from your work email
David
To get Internal name and display name.Here is the query from database.
SELECT CN.idA2A2 AS PartId, name AS InternalName, CAST(LLPV.value AS VARCHAR(1000)) AS DisplayName, CN.idA3A4 as ParentID, CN.idA2A2 as Id
FROM db_windchill_dev.LWCStructEnumAttTemplate AS CN INNER JOIN db_windchill_dev.LWCLocalizablePropertyValue LLPV ON
LLPV.idA3C4=CN.idA2A2 AND LLPV.idA3B4=CN.idA2A2 AND LLPV.classnamekeyA4='com.ptc.core.lwc.server.LWCPropertyDefinition' and
LLPV.idA3A4 in (SELECT idA2A2 FROM db_windchill_dev.LWCPropertyDefinition where name='displayName' and
classname='com.ptc.core.lwc.server.LWCAbstractAttributeTemplate')
I tried multiple APIS like below but its not updating:
TypeDefinitionReadView nodeView = TypeDefinitionServiceHelper.service.getTypeDefView(AttributeTemplateFlavor.LWCSTRUCT, "com.ptc.csm.default_clf_namespace", name);
String str3 = nodeView.getName();
TypeDefinitionNodeView typeDefinitionNodeView = new TypeDefinitionNodeView(str3, lwcStructEnumAttTemplate.getPersistInfo().getObjectIdentifier());
typeDefinitionNodeView.setDisplayName("TestDisplay");
typeDefinitionNodeView.setDescription("TestDescription");*/
Yeah, I know how to get Internal name, display name, description, image, attributes, etc from a classification tree using sql and/or Windchill APIs.
I wrote a utility that can make updates to the nodes classification tree and well as classifying WTParts WITHOUT iterating the WTPart. To be honest, I have more experience with PartsLink than I want to have.
So, you have my email address if you want help send me an email.
David