|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
Teamcenter二次开发源码:通过teamcenter SOA 开发查找Item5 ?% c- b$ s- z$ w. D& ^# I
( U+ C" ~4 r8 u0 |, j- Z! {7 o! S
public static Item findExistingItem( DataManagementService dmService, String itemIDs){, B( G1 _% [4 ~7 }& ^) Q
com.teamcenter.services.strong.core._2007_01.DataManagement.GetItemFromIdInfo infos[] = new com.teamcenter.services.strong.core._2007_01.DataManagement.GetItemFromIdInfo[1];7 B5 p' j, e6 b, @5 Q
infos[0] = new com.teamcenter.services.strong.core._2007_01.DataManagement.GetItemFromIdInfo();
q! [; o5 g$ u; T6 Pinfos[0].itemId = itemIDs;* C7 |: Z* s9 |& z3 L. i @
com.teamcenter.services.strong.core._2007_01.DataManagement.GetItemFromIdPref pref = new com.teamcenter.services.strong.core._2007_01.DataManagement.GetItemFromIdPref();8 h9 P% m+ |. `5 L' G
pref.prefs = new com.teamcenter.services.strong.core._2007_01.DataManagement.RelationFilter[0];
" R& V* |$ b2 y: m4 m$ w4 t4 T- yGetItemFromIdResponse resp = dmService.getItemFromId(infos, 0, pref);$ }. j6 B% p% e( b
Item result[] = new Item[ resp.output.length ];' d- A4 P: B3 V5 M% I7 h$ P
for ( int i = 0; i < resp.output.length; i++ )7 s8 h3 `% h- |
result = resp.output.item;! y8 c9 S! A. t: K$ o1 x
) w9 |) P" u. R9 J3 Z# h; j4 |
if ( resp.output.length > 0 )/ l; G& G# \) K+ v
return result[0];
% q7 k: T0 P, `. e1 A& Selse
- h( X: ?5 F) L2 xreturn null;
3 _. x: B* u7 g' H2 I; E}
% ~3 h* X, T# g- K1 U4 c2 w" f; M! K( T* |7 C6 M3 \! l, _
# p/ R7 `( t' J( g6 r+ B6 X |
|