PLM之家PLMHome-国产软件践行者

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

[复制链接]

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

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

admin 楼主

2018-8-1 14:03:35

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

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

x
【Aras二次开发源码】编写可其他方法的子程序的通用方法5 u1 T- a( @. G2 m" v+ x/ K7 \
Technique  
0 b+ `/ r8 P; r/ @! UUse the  Innovator.applyMethod()  method to apply Generic Methods.  The following 8 S. J; G. y) L9 J, ?* [8 E
examples assume a server-side method named "Reverse String" exists, and that it ; N. H9 O& Q- @  W' k4 y4 E
returns a result item containing the reversed contents of the <string> tag.
3 O! e; x( _: H8 eJavaScript  ' b) J) n' z" {# r" ]
var inn = this.newInnovator(); 3 w2 D5 N: N1 H
var results = inn.applyMethod("Reverse String", "<string>abc</string>"); 5 d: k7 E8 ]3 v' t% y& Z0 s
// You can also apply a generic client method but only from another client-side method
+ Q# V5 U: k4 h// var results = inn.applyMethod("Reverse String JS","<string>abc</string>","client"); 7 h; ?2 D. x5 A7 v
return results.getResult(); // returns "cba"  C#  ! k: y* q8 R6 B4 w  [0 H$ O3 u
Innovator inn = this.newInnovator();
8 w" I, k% Y2 I' X, d! RItem results = inn.applyMethod("Reverse String", "<string>abc</string>"); 4 @9 D6 J) b$ j/ [# Y3 J; R
// Return a result item with "cba" as the contents of the Result tag
8 H! `& C( L0 o' xreturn inn.newResult(results.getResult());  
% }3 h, U( m) ~VB.Net % D6 x* w; {# i: ^3 M8 E
Dim inn As Innovator = Me.newInnovator()
, K  k7 c  T$ g# t+ JDim results As Item = inn.applyMethod("Reverse String", "<string>abc</string>")
7 m1 h8 ?! C8 d7 f$ v# y' Return a result item With "cba" As the contents of the Result tag
' V; g  a/ Z! o/ dReturn inn.newResult(results.getResult())
. Q; \3 r; b& R0 a( |& `; }+ e+ H( W- S, e$ Y: w/ T* Q( f2 t# p$ O
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了