查看: 6599|回复: 0

teamcenter二次开发源码:通过teamcenter SOA 开发查找Item

[复制链接]

6

主题

4

回帖

60

积分

管理员

积分
60
发表于 2014-12-10 21:03:46 | 显示全部楼层 |阅读模式

请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!

您需要 登录 才可以下载或查看,没有账号?注册

×
Teamcenter二次开发源码:通过teamcenter SOA 开发查找Item) c: e/ a$ _7 V% |* j; u/ M3 x
8 A# c2 ^+ f( q
public static Item findExistingItem( DataManagementService dmService, String itemIDs){
! u" @+ ^2 R4 b% e: y+ \5 hcom.teamcenter.services.strong.core._2007_01.DataManagement.GetItemFromIdInfo infos[] = new com.teamcenter.services.strong.core._2007_01.DataManagement.GetItemFromIdInfo[1];8 H' ?$ b2 V/ v7 u8 J( D* g6 _1 c
infos[0] = new com.teamcenter.services.strong.core._2007_01.DataManagement.GetItemFromIdInfo();+ d' D: |6 [8 a6 A" l  `9 V0 s6 l
infos[0].itemId = itemIDs;
: K- {" g- e/ K8 i2 Ccom.teamcenter.services.strong.core._2007_01.DataManagement.GetItemFromIdPref pref = new com.teamcenter.services.strong.core._2007_01.DataManagement.GetItemFromIdPref();
7 M4 Z; C$ m% V6 ypref.prefs = new com.teamcenter.services.strong.core._2007_01.DataManagement.RelationFilter[0];
$ w. C/ G( D; H4 X, H8 l8 _/ pGetItemFromIdResponse resp = dmService.getItemFromId(infos, 0, pref);( U# l6 n4 }) _
Item result[] = new Item[ resp.output.length ];- W" M( T8 ^4 o  T5 C- h0 X5 O
for ( int i = 0; i < resp.output.length; i++ )/ b- G7 ^0 c3 J
result = resp.output.item;; h5 O/ Y- Z3 V6 G/ \% [4 {
  Q" s6 a$ O: K7 F# n. C
if ( resp.output.length > 0 )
2 V  l6 d2 W5 E5 Z9 ~5 xreturn result[0];; a) ?" C: N. B$ J/ q+ Y! B" O4 t0 N
else! H0 _, j; s, G% p8 j
return null;$ @4 o, ^- H7 I& b) D4 ^% K. D
}
" X: f5 U5 b7 M6 H* j1 _
6 O. {* I+ h, {5 [5 n/ Z- X3 F* J

4 X% a; N) F3 i9 E% _/ i
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 www.doteam.tech
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

在本版发帖
关注公众号
QQ客服返回顶部