查看: 2639|回复: 0

【Aras二次开发源码】编写可其他方法的子程序的通用方法

[复制链接]

4

主题

3

回帖

40

积分

管理员

积分
40
发表于 2018-8-1 14:03:35 | 显示全部楼层 |阅读模式

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

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

×
【Aras二次开发源码】编写可其他方法的子程序的通用方法9 d( Y( r+ Q! w
Technique  
" p" c1 L, U& ^# ]Use the  Innovator.applyMethod()  method to apply Generic Methods.  The following
7 c7 Q+ Z4 {) E5 s" A) d1 c5 `examples assume a server-side method named "Reverse String" exists, and that it 9 v& B" D) K7 m0 x3 K
returns a result item containing the reversed contents of the <string> tag.
: D  O6 r$ L) `0 ?5 DJavaScript  
3 s6 \9 C, y  Q% l& t" |var inn = this.newInnovator();
! A) _4 m8 z1 w2 g" }  T, {  kvar results = inn.applyMethod("Reverse String", "<string>abc</string>"); ! A: _0 o2 X( o: V5 C
// You can also apply a generic client method but only from another client-side method $ p/ X- t, A5 g) U2 X$ C3 w) \
// var results = inn.applyMethod("Reverse String JS","<string>abc</string>","client"); 3 G* C2 A4 R; \% S
return results.getResult(); // returns "cba"  C#  $ Z3 }- |# q, X4 [$ b; k; M0 U
Innovator inn = this.newInnovator(); 8 H: B3 M: V( y5 {; _. x5 _! Y
Item results = inn.applyMethod("Reverse String", "<string>abc</string>"); 4 R0 q. {6 U! W  L
// Return a result item with "cba" as the contents of the Result tag
; i1 i" K2 f) p4 H# [return inn.newResult(results.getResult());  
+ q) D" ?7 `# M5 C# EVB.Net 5 |6 z: P/ L9 T0 i4 V0 Y
Dim inn As Innovator = Me.newInnovator() ; s5 ?7 X+ z, S2 ?
Dim results As Item = inn.applyMethod("Reverse String", "<string>abc</string>") 9 `* {+ o1 d) H1 ?5 f
' Return a result item With "cba" As the contents of the Result tag + p2 C& V3 a+ `
Return inn.newResult(results.getResult())
# b+ i( m& O& t% `
4 R+ z8 J& M; S" s
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 www.doteam.tech
回复

使用道具 举报

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

本版积分规则

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