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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

How to get the Product Type using Windchill API

Neo
7-Bedrock
7-Bedrock

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.

ACCEPTED SOLUTION

Accepted Solutions
IsmailShaik
12-Amethyst
(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
12-Amethyst
(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.

ptc-4900743
1-Visitor
(To:Neo)

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


Top Tags