PLM之家PLMHome-工业软件与AI结合践行者

【Aras二次开发】查询一个对象代码

[复制链接]

2018-8-1 13:33:57 1859 0

admin 发表于 2018-8-1 13:33:57 |阅读模式

admin 楼主

2018-8-1 13:33:57

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

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

x
' q' y8 o# y9 ]

2 w- @3 N* W$ `: a$ k. p2 B, b" _8 O2 F: W" @/ l5 S

* Z# x: G& @1 ^! H. E1 r6 j3 c) VTechnique  
7 D  k  f: |0 x% X+ ]2 qThere are a few ways to get an Item when you know its id and type, the simplest $ ~5 V7 K5 V8 O' N7 t' n1 B& n
being the  Innovator.getItemById()  method.  However, if you need to be granular about
# i6 ?- C0 ]( ]* myour request then building the query using the IOM is required.  This provides the
/ t7 B4 q4 {- [9 lability to include controls to limit the results and define the structure to be returned 0 _8 r! p* J- U
for the Items found.
+ r' k; L+ w, B" w, }6 n4 [JavaScript  
: L  O, N, ?+ Z1 q, t! [var qryItem = this.newItem(myType,"get");
& O) e; o) \# y9 W3 o) zqryItem.setID(myId); , d1 [% p0 I/ g
var results = qryItem.apply(); 2 X& ~& k/ `# H/ i2 |1 y7 z2 K
, l, h1 w1 @. s, Z9 ?% u
) k7 [# G) U% N
var myInnovator = this.newInnovator();
8 |; U$ g5 N$ M* Zvar results = myInnovator.getItemById(myType, myId);
' ]6 n* F! r! E1 o* hC#  
( D1 w5 N  o" }1 sItem qryItem = this.newItem(myType,"get");
" `; Q8 D4 E1 {7 u4 RqryItem.setID(myId);
3 m% Q6 A% y0 W. A+ `( ]Item results = qryItem.apply();
! I/ J; b: C" p7 p# J/ G+ N3 }' h: c# X; k2 G0 }

! x) F, {5 M3 K$ A* FInnovator myInnovator = this.newInnovator(); ! L3 I+ Y* [- ?0 O
Item results = myInnovator.getItemById(myType, myId);
0 `$ M# f3 W( J% D9 i  w8 o# C4 l3 TVB.Net  9 W5 w- H5 v$ o
Dim qryItem As Item = Me.NewItem(myType,"get")
' l& q- o1 o9 R6 C$ CqryItem.setID(myId)
+ p: E2 X( p- Y% U7 B- ADim results As Item = qryItem.Apply() 4 N7 r) ]6 ]' C. Y8 u8 X

' \0 @# D5 q2 I( x( d% G7 J
. ?) L) x  l! I4 L. Q- o
Dim myInnovator As Innovator = Me.NewInnovator()
+ p+ Q5 ]& x. ~0 [- U3 b" rDim results As Item = myInnovator.GetItemById(myType, myId)  d5 U- k- |/ d/ j5 A' j% H" c

" G  t  H. l# e- c( L! P

0 E- N" p: d- D- i: r& N' ?7 t' Z4 c) g& F

$ z0 ^( O. }1 e* f$ ~% `& v
% n* n! x; S: K$ D
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 doTeam.tech
回复

使用道具 举报

发表回复

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

返回列表 本版积分规则

  • 发布新帖

  • 在线客服

  • 微信

  • 客户端

  • 返回顶部

  • x
    温馨提示

    本网站(plmhome.com)为PLM之家工业软件学习官网站

    展示的视频材料全部免费,需要高清和特殊技术支持请联系 QQ: 939801026

    PLM之家NX CAM二次开发专题模块培训报名开始啦

    我知道了