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

We are happy to announce the new Windchill Customization board! Learn more.

How to get the Product Type using Windchill API

Neo
1-Newbie
1-Newbie

How to get the Product Type using Windchill API

Hello team,

Can any one help me how I can get the Type of PDMLinkProduct using Windchill API.

I have created a Product softtype using type and attribute manager wt.pdmlink.PDMLinkProduct|com.company.testProduct and I want to create it using the Windchill API but I am not sure how to set the type of the object can any one help me in this.

1 ACCEPTED SOLUTION

Accepted Solutions
IsmailShaik
4-Participant
(To:Neo)

The following piece of code might help here.

TypeDefinitionReference typeDefRef1 = TypedUtilityServiceHelper.service.getTypeDefinitionReference(objType);

PDMLinkProduct p = PDMLinkProduct.newPDMLinkProduct();

p.setTypeDefinitionReference(typeDefRef1);

View solution in original post

3 REPLIES 3
IsmailShaik
4-Participant
(To:Neo)

The following piece of code might help here.

TypeDefinitionReference typeDefRef1 = TypedUtilityServiceHelper.service.getTypeDefinitionReference(objType);

PDMLinkProduct p = PDMLinkProduct.newPDMLinkProduct();

p.setTypeDefinitionReference(typeDefRef1);

See CS135663 for information on API used for IBA.

Hi Aniket,

Follow this article

http://maheshmhetre.blogspot.com/2014/07/soft-type-how-to-get-type-definition.html

Below code snippet may help you

TypeDefinitionReference typeDefRef = TypedUtility.getTypeDefinitionReference("com.maheshmhetre.epmdoc.TestEPMDocument");

if (typeDefRef != null) {

typeDefRef.getKey().getId()));

}

Top Tags