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

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

[复制链接]

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

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

admin 楼主

2018-8-1 14:03:35

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

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

x
【Aras二次开发源码】编写可其他方法的子程序的通用方法
9 \$ B3 w* {$ I' T8 b5 D4 fTechnique  $ M. f6 @* d% q2 e/ f8 S
Use the  Innovator.applyMethod()  method to apply Generic Methods.  The following ; v) `1 U7 A8 i; D8 P
examples assume a server-side method named "Reverse String" exists, and that it * b% E2 l* @+ {1 x6 S) J7 u
returns a result item containing the reversed contents of the <string> tag. 4 y/ F) t: w# e
JavaScript  ; U) P6 }- m3 g. ~; }2 T+ G( A
var inn = this.newInnovator();
& t) v5 P# w2 G  [var results = inn.applyMethod("Reverse String", "<string>abc</string>"); : p1 O% k% W3 E" Y8 ]" B: \
// You can also apply a generic client method but only from another client-side method
6 ?+ h( q9 P0 A8 ?// var results = inn.applyMethod("Reverse String JS","<string>abc</string>","client"); 7 A1 Z0 ~# O- C6 x; `5 c
return results.getResult(); // returns "cba"  C#  ' G9 R+ W+ L* \7 r8 [% `! s
Innovator inn = this.newInnovator(); ' E' x( E; ?6 x4 z( y" c/ A
Item results = inn.applyMethod("Reverse String", "<string>abc</string>");
3 o/ j0 _! [: W$ X, R// Return a result item with "cba" as the contents of the Result tag 3 k' R! Q; O( U/ l( f: L7 n0 N& q
return inn.newResult(results.getResult());  
* F6 f7 F/ q- o5 K8 F. YVB.Net
* W* A' f: q1 d; |) L1 u) GDim inn As Innovator = Me.newInnovator() ; U4 j: m, ~5 R
Dim results As Item = inn.applyMethod("Reverse String", "<string>abc</string>")
* o9 B' u) S6 j* \' Return a result item With "cba" As the contents of the Result tag & _& Q2 g) d- q. ^/ v- w2 }
Return inn.newResult(results.getResult()) * x+ u  \9 k5 p3 ?  T- n, E

# [3 `0 f0 I# o2 L  U- `
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了