查看: 6727|回复: 0

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

[复制链接]

2480

主题

1280

回帖

8万

积分

管理员

PLM之家站长

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

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

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

×
Teamcenter二次开发源码:通过teamcenter SOA 开发查找Item, Z# q' J6 y  R! B
) N) r2 o8 D7 H) I' y( n; {( C
public static Item findExistingItem( DataManagementService dmService, String itemIDs){
0 |. i; V: a# M- e: J  @2 h$ pcom.teamcenter.services.strong.core._2007_01.DataManagement.GetItemFromIdInfo infos[] = new com.teamcenter.services.strong.core._2007_01.DataManagement.GetItemFromIdInfo[1];, o( J8 d* c/ N  O
infos[0] = new com.teamcenter.services.strong.core._2007_01.DataManagement.GetItemFromIdInfo();# g& ^. n" p3 |2 F; Z+ t. Z% S; i
infos[0].itemId = itemIDs;
9 w! N4 h% c& n3 E% {% }com.teamcenter.services.strong.core._2007_01.DataManagement.GetItemFromIdPref pref = new com.teamcenter.services.strong.core._2007_01.DataManagement.GetItemFromIdPref();% ]% N3 S& S/ o6 }6 \
pref.prefs = new com.teamcenter.services.strong.core._2007_01.DataManagement.RelationFilter[0];
& f2 n) n  x. Y, U, NGetItemFromIdResponse resp = dmService.getItemFromId(infos, 0, pref);7 M' Z& F& P1 K2 E
Item result[] = new Item[ resp.output.length ];
( X2 X, y# V2 [6 I. ?2 F) v! ufor ( int i = 0; i < resp.output.length; i++ )
3 Y1 {4 o! E3 W8 e! e% Lresult = resp.output.item;) u1 V) Y( H& j. X: ?0 }
  ?+ F4 C  A8 Z( Y! o8 R9 b
if ( resp.output.length > 0 )8 D# {+ P2 B4 |4 R  U) ?) l; d
return result[0];
" H; Z8 b1 _( E* Lelse5 z4 [/ [9 N7 V" S: O: L: Y
return null;* u$ U) P0 E- C0 O% a- u
}
' G6 m9 M- M$ ]
+ \. h8 n3 P1 d- l
2 @0 g1 ^9 E  S7 S4 w& s1 ?! ^% |1 L
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 doTeam.tech
回复

使用道具 举报

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

本版积分规则

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