根据WTPartMaster获取其对应的所有WTPart的方法

本文详细介绍了如何通过WTPartMaster获取对应的所有WTPart,并着重阐述了如何从EPMDocument中获取该对象的CAD图纸,包括获取小版本的方法及展示关键属性的步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

根据WTPartMaster获取其对应的所有WTPart的方法:

LatestConfigSpec latestconfigspec = new LatestConfigSpec();
QueryResult queryresult = ConfigHelper.service.filteredIterationsOf(partMaster, latestconfigspec);

获取小版本的方法:
VersionControlHelper.getIterationIdentifier((Iterated)wtpart).getValue();

System.out.println(wtpart.getName());
System.out.println(wtpart.getNumber());
System.out.println(wtpart.getVersionDisplayIdentifier().getLocalizedMessage(Locale.CHINA));
System.out.println(wtpart.getVersionDisplayIdentity().getLocalizedMessage(Locale.CHINA));
System.out.println(wtpart.getVersionDisplayType().getLocalizedMessage(Locale.CHINA));
System.out.println(wtpart.getVersionIdentifier().getValue());
System.out.println(wtpart.getVersionInfo().getIdentifier().getValue());
System.out.println(wtpart.getView().getName());
System.out.println(wtpart.getViewName());

显示的结果为:

GOLF_CART
GC000001
A.A (Manufactur
修订 (视图) A.A
修订 (视图)
A.A
A.A
Manufacturing
Manufacturing


关于WTPart、EPMDocument和CAD图纸的问题

我已知一个WTPart对象,怎么才能得到该对象的CAD图纸呢
有人说是要先得到EPMDocument,那么我怎么从EPMDocument里面拿到这张图纸呢
供参考:
contentholder = ContentHelper.service.getContents(contentholder);

Enumeration enum = ContentHelper.getContentListAll(contentholder).elements();

while (enum != null && enum.hasMoreElements())

{
ContentItem item = (ContentItem) enum.nextElement();

if (item instanceof ApplicationData)

{
ApplicationData appData = (ApplicationData) item;
ContentServerHelper.service.writeContentStream(appData, pathName + File.separator + appData.getFileName());

}

}

请查阅相关API。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值