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

How to get the Product Type using Windchill API

SOLVED
Highlighted
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
Highlighted

Re: How to get the Product Type using Windchill API

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
Highlighted

Re: How to get the Product Type using Windchill API

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

Highlighted

Re: How to get the Product Type using Windchill API

See CS135663 for information on API used for IBA.

Highlighted

Re: How to get the Product Type using Windchill API

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()));

}

Announcements