|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
" w5 U6 Y& G/ N
" ?: J5 ?6 e% \) f4 B1 e
6 |( b: r- H' V
; w6 P4 f& v6 a" e( JTechnique
$ Z9 ^3 e* q" C. A2 Q9 X6 i0 @$ vThere are a few ways to get an Item when you know its id and type, the simplest ' |, [. e- P2 N* G8 A
being the Innovator.getItemById() method. However, if you need to be granular about - {* m& Q$ b- A6 ?( h/ |
your request then building the query using the IOM is required. This provides the
- {( H/ V6 [& \' [ability to include controls to limit the results and define the structure to be returned
& ~1 U) Z- V$ @' ]/ Pfor the Items found. , z9 V1 }1 h+ S: k7 e" h% L/ L
JavaScript + l$ a2 L; ? @) I
var qryItem = this.newItem(myType,"get"); 2 _3 L9 O% ]2 y" z; ^; X" Z
qryItem.setID(myId); ! J# m$ Z4 I& ^& H* b4 i
var results = qryItem.apply(); 1 } |- P: k: z
, [) e% C, a) e+ w( L7 ]: A8 w @0 P* s2 J3 |8 {3 }5 k0 |1 S9 y d
var myInnovator = this.newInnovator(); 7 S+ L" v: K. H f3 V0 t9 @
var results = myInnovator.getItemById(myType, myId);
7 A! V4 I$ m5 t* u3 u1 K7 C& KC#
d8 {' }2 d2 W' }$ ZItem qryItem = this.newItem(myType,"get");
; |4 P' ~' w, X% N$ |) QqryItem.setID(myId); 9 G! [" Y+ h; U% `
Item results = qryItem.apply(); % e) n6 g8 J+ n, h
! U! _! ]6 `: w, p- s
j1 E1 F+ `/ r+ R5 f# L6 n3 Y0 P PInnovator myInnovator = this.newInnovator(); 0 d2 X; @* z0 M
Item results = myInnovator.getItemById(myType, myId);
# F6 Z% }: z% z9 qVB.Net
* f J. ~' E" ?* G* @0 }& uDim qryItem As Item = Me.NewItem(myType,"get")
+ @7 {# m* M6 fqryItem.setID(myId)
; x3 Q- z; b, ]/ _$ P0 BDim results As Item = qryItem.Apply()
; w' h3 f0 y, R' w; X8 L
' x" N, M0 A% v
: q" a0 [1 L. A' x0 c' ?Dim myInnovator As Innovator = Me.NewInnovator() 8 e. _, n( ~; ?, A1 i1 X
Dim results As Item = myInnovator.GetItemById(myType, myId)
3 e" g6 s4 i- W) `- L s
/ c+ e' z3 w9 R6 A; u" }4 k1 `2 d3 Q$ `, V
. O7 Q; D- S. b% {* ?
6 K+ b& s# }: L5 v2 t7 S9 g; T7 P$ V" {, n( m) f
|
|