Article - CS384380

Is there any API available to get "Assigned Usage Expressions" and "Assigned Item Expressions" attribute values in Publication structure using Windchill service information manager

Modified: 13-Jan-2023   


Applies To

  • Windchill Service Information Manager 11.2 to 12.1
  • Customer developing custom code to export publication structure in excel file 
  • Requirement is to get "Assigned Usage Expressions" and "Assigned Item Expressions" and show in excel file
  • Assigned Usage Attribute is available on WTPartaUsageLink:
  •  Trying to get Assigned Usage Attribute from WTPartUsageLink but no luck
  • Code:
WTPartUsageLink ul = (WTPartUsageLink) qr.nextElement();
                     WTPartMaster pm = (WTPartMaster) ul.getUses();
                     System.out.println("usage link expression data:: "+ul.getExpressionData());
                    
                     PersistableAdapter paObject = new PersistableAdapter(ul, null, null, null);
                     paObject.load("partUsageAssignedExpression");
                     Object usageAssignedExpression = paObject.get("partUsageAssignedExpression");
                     if(usageAssignedExpression!=null) {
                           System.out.println("@@@@@@@@usage assigned expression@@@@@@@@@::"+usageAssignedExpression.toString());
                      }
  • Used ul.getExpressionData() and PersistableAdapter API also but getting value as null

Description

  • Is there any API available to get "Assigned Usage Expressions" and "Assigned Item Expressions" attribute values in Publication structure?
This is a printer-friendly version of Article 384380 and may be out of date. For the latest version click CS384380