没有合适的资源?快使用搜索试试~ 我知道了~
windchill二次开发
3星 · 超过75%的资源 需积分: 50 40 下载量 193 浏览量
2013-02-22
23:18:12
上传
评论 3
收藏 16KB DOCX 举报
温馨提示
试读
3页
windchill客制化开发很好的资源,适用于windchill 10.0 的开发
资源推荐
资源详情
资源评论
Windchill二次开发中常用的 API 方法
# 1.根据零件名称/编码得到该零件
# wt.clients.prodmgmt.WTPartHelper.ndPartByName(name) ;
# wt.clients.prodmgmt.WTPartHelper.ndPartByNumber(number);
# 2.根据 WTpart 得到WTparMaster
# WtPart wtpart;
# WTPartMaster wtmaster=(WTPartMster)part.getMaster();
# 3.获取 codebase 下配置文件wt.properties 属性信息
# WTProperties wtproperties = WTProperties.getLocalProperties();
# String wthome = wtproperties.getProperty("wt.home", ""); //codebase 的文件夹路径
# 4.获取 part 被借用的所有父部件
# QueryResult qr= wt.part.WTPartHelper.service.getUsedByWTParts(WTPartMster wtMaster);
# 注:此方法得到的结果为该 part 被使用情况的全部父部件,包括了 Design 视图及Manufacturing 视图更包括# 了父
部件使用 part 的所有修订版本,打印出来可以看到会有相同的部件编号,不同的修订版本.
# 5. 根据 OID 获取 Wtpart
# wt.fc.WTReference partRef = new wt.fc.ReferenceFactory().getReference( oid );
# WTPart wtpart=(WTPart)partRef;
# 6.得到零件最新版本
# WTPart wtpart= (WTPart) VersionControlHelper.getLatestIteration(part);
# 7.通过过滤得到零件最新版本
# QuerySpec querysearch = new QuerySpec(WTPartMaster.class);
# //查询所有的 WTPartMaster
# QueryResult queryresult = PersistenceHelper.manager.nd(querysearch);
# LatestCongSpec latestcongspec = new LatestCongSpec();
# //根据 WTPartMaster 查询所有最新版本的零部件
# QueryResult allWTPart = CongHelper.service.lteredIterationsOf(queryresult,latestcongspec)
# 8.查询某用户某段时间范围内创建的零件
# QuerySpec qs = new QuerySpec(WTPart.class);
# qs.appendSearchCondition(new SearchCondition(WTPart.class,WTPart.CREATE_TIMESTAMP, true,
wt8511
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页