windchill 获取文档子类型内部名称和显示
1. 场景:
获取文档的内部名称:


2. 代码
WTDocument doc = DocUtils.getDocumentByOid("VR:wt.doc.WTDocument:115509");
// 获取子类型 内部名称
String type = TypeIdentifierUtilityHelper.service.getTypeIdentifier(doc).toString();
System.out.println(type); //输出结果: WCTYPE|wt.doc.WTDocument|com.yjgroup.Trial_Product_List
//获取子类型 子类型显示名称
TypeIdentifier typeIdentifier = TypeIdentifierHelper.getType(doc);
TypeDefinitionReadView readView = TypeDefinitionServiceHelper.service.getTypeDefView(typeIdentifier);
String typeDisplay = readView.getDisplayName();
System.out.println(typeDisplay); //输出结果:产品试制单
3.输出结果


浙公网安备 33010602011771号