Solved
Getting Usage link attrubutes API
Is there an API to retrieve the uses attributes in the part structure for WTPart?
Attributes such as Line Number, Quantity, Unit, Trace Code, Reference Designator, Find Number.
Is there an API to retrieve the uses attributes in the part structure for WTPart?
Attributes such as Line Number, Quantity, Unit, Trace Code, Reference Designator, Find Number.
Hi
You can use something like this:
QueryResult qResult = WTPartHelper.service.getUsesWTParts(primWtp, new LatestConfigSpec());
while (qResult.hasMoreElements())
{
Object[] obj = (Object[]) qResult.nextElement();
WTPartUsageLink link = (WTPartUsageLink) obj[0];
WTPart subWTP = (WTPart) obj[1];
long lineNumber = link.getLineNumber().getValue();
double amount = link.getQuantity().getAmount();
String unit = link.getQuantity().getUnit().getStringValue();
String traceCode = link.getTraceCode().getStringValue();
}
PetrH
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.