PLM之家PLMHome-工业软件践行者

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

[复制链接]

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

2470

主题

1275

回帖

8万

积分

管理员

PLM之家站长

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

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

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

x
【Aras二次开发源码】编写可其他方法的子程序的通用方法
" B+ o4 J- ^9 w  a; fTechnique  
7 _) p7 T6 X7 |1 Z: @  v* YUse the  Innovator.applyMethod()  method to apply Generic Methods.  The following ; X9 j0 X, p8 b8 i
examples assume a server-side method named "Reverse String" exists, and that it 0 z9 `1 `+ C% F; A3 |; y% F; U
returns a result item containing the reversed contents of the <string> tag.
6 S, N7 ~' a( @& L; K" VJavaScript  
, E$ _& O; {+ Y+ avar inn = this.newInnovator();
! K# L) q* L8 O3 D8 ?var results = inn.applyMethod("Reverse String", "<string>abc</string>");
8 P* f/ u$ ~; b' o8 x/ y* t- e// You can also apply a generic client method but only from another client-side method
8 m. q* z  f( c2 a& O// var results = inn.applyMethod("Reverse String JS","<string>abc</string>","client"); # E' `( ]3 K2 t* m; Q
return results.getResult(); // returns "cba"  C#  
( J; Y- B7 }6 e( }( ]& A3 o  S; VInnovator inn = this.newInnovator();
- x7 i$ I% X0 O) j% o: oItem results = inn.applyMethod("Reverse String", "<string>abc</string>"); 8 W: c# \* {3 B
// Return a result item with "cba" as the contents of the Result tag / b8 k6 M% p6 }  A% w# J
return inn.newResult(results.getResult());  
8 N7 U& ]) @" q5 JVB.Net
! y& ]1 c! _" v  t$ [1 ~Dim inn As Innovator = Me.newInnovator()
( ~; T1 S3 B8 Y2 _; B) c; c# VDim results As Item = inn.applyMethod("Reverse String", "<string>abc</string>") ; {" p4 a2 O" ^  K0 t" E0 [
' Return a result item With "cba" As the contents of the Result tag
; \. D) C9 P3 L7 Z9 }Return inn.newResult(results.getResult()) : d9 _: t  Q" @' M: S% t

, \, _$ D9 m, N' w8 {
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了