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

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

[复制链接]

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

2470

主题

1275

回帖

8万

积分

管理员

PLM之家站长

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

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

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

x
【Aras二次开发源码】编写可其他方法的子程序的通用方法* v: d3 r& X) ^$ t/ s  Y
Technique  
- e& M- W$ `+ k) o0 |# w* ]2 r7 `Use the  Innovator.applyMethod()  method to apply Generic Methods.  The following ! V7 z: ~9 p4 C( L/ x
examples assume a server-side method named "Reverse String" exists, and that it + ], I" u; Q3 a7 l2 n4 u  D
returns a result item containing the reversed contents of the <string> tag.
$ G. s1 b" W, _* v2 dJavaScript  9 r6 v, y- z1 h# F
var inn = this.newInnovator();
8 Y% y- }  [% w7 T4 ^' Z% B6 Mvar results = inn.applyMethod("Reverse String", "<string>abc</string>"); , M5 i7 k- x  i& K
// You can also apply a generic client method but only from another client-side method   e1 e, ^( ]* Y5 M4 n7 h% A' @. {6 V3 m
// var results = inn.applyMethod("Reverse String JS","<string>abc</string>","client");
' n  d3 Q, t, d8 t# z7 I; Greturn results.getResult(); // returns "cba"  C#  6 a4 @( g4 y; p  s! w4 o" [' B
Innovator inn = this.newInnovator(); 0 U$ \5 L5 ]& z/ w  ~
Item results = inn.applyMethod("Reverse String", "<string>abc</string>");
% c- J' s  ]& C% s/ p// Return a result item with "cba" as the contents of the Result tag + H8 n& I0 Y; ~+ Q6 X
return inn.newResult(results.getResult());  , {! t+ Z2 U# V$ y
VB.Net
# ]/ ?# R. n! |% Z" RDim inn As Innovator = Me.newInnovator()
; j# ~5 g! `* L5 z- `Dim results As Item = inn.applyMethod("Reverse String", "<string>abc</string>") 3 x% ]% a$ H: f* Y0 p' P
' Return a result item With "cba" As the contents of the Result tag
) x' K; b: Z  f7 T/ [8 mReturn inn.newResult(results.getResult()) 4 ^+ p6 j7 T! k
4 `5 ~, N( S" X* x! S7 l
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了