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

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

[复制链接]

2018-8-1 14:03:35 2566 0

admin 发表于 2018-8-1 14:03:35 |阅读模式

admin 楼主

2018-8-1 14:03:35

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

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

x
【Aras二次开发源码】编写可其他方法的子程序的通用方法9 n! D% \( M) }9 \. d, p; X+ y
Technique  , \1 n2 ^2 }- k% R
Use the  Innovator.applyMethod()  method to apply Generic Methods.  The following 1 @( H+ z1 }6 u# i
examples assume a server-side method named "Reverse String" exists, and that it
6 U2 ?; G# U' L# S# Z) g$ {% ureturns a result item containing the reversed contents of the <string> tag.
. X0 L! p, p: ~% a) {3 cJavaScript  
" P" q& \& B0 \8 P  v- Y" Nvar inn = this.newInnovator();
: G$ u9 j4 \5 a7 |7 a$ gvar results = inn.applyMethod("Reverse String", "<string>abc</string>");
  w. _" G) |( p* e" L% u// You can also apply a generic client method but only from another client-side method 7 a" f! X* k8 T1 G# d
// var results = inn.applyMethod("Reverse String JS","<string>abc</string>","client");
" G# G' W' |5 J6 F6 |6 Ureturn results.getResult(); // returns "cba"  C#  
- t# F8 F+ O% F" A: r0 |Innovator inn = this.newInnovator();
1 H  w0 x- `" X  KItem results = inn.applyMethod("Reverse String", "<string>abc</string>");
% P# {2 D6 C* T6 b4 S' L! a// Return a result item with "cba" as the contents of the Result tag 9 \+ Z, k3 v' _8 ]7 H
return inn.newResult(results.getResult());  5 B$ z# ]" A# U( K
VB.Net ! ^% T. ?, [; C8 W' I) S- e* `1 y
Dim inn As Innovator = Me.newInnovator() 9 _/ k9 r4 m$ f. o* v6 |
Dim results As Item = inn.applyMethod("Reverse String", "<string>abc</string>")
/ A5 m6 R5 x2 C  c# m. k' Return a result item With "cba" As the contents of the Result tag
& P5 l( m, b1 s4 {" V9 ?; GReturn inn.newResult(results.getResult())
: v( P* n3 r) I9 p  k- ?3 z) K; W: C, [' [& R. M- f
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了