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

【Aras二次开发】获取下一个流程状态

[复制链接]

2018-8-1 13:46:23 2367 0

admin 发表于 2018-8-1 13:46:23 |阅读模式

admin 楼主

2018-8-1 13:46:23

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

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

x
7 o4 l" O$ _/ o. `
- z+ [6 G9 H  C2 `: F& ^
Technique  
  i( h! o" E& }  H* |. u8 f4 nUse the  Item.getNextStates()  method to get the next state values.  This recipe
2 n* H/ ]  C8 K* n9 U1 sassumes there is a select input field on the form for us to populate with state values. ) r# X+ Y/ ^) g9 ~3 m( z7 F9 R
HTML  
) h0 z& m( Q3 l5 [3 X. z<select id="mySelect"></select>  
% C: Q& ?6 h! `, oJavaScript  9 L1 r/ a6 Z; m, u- S$ K% q, k! O
var results = document.thisItem.getNextStates();
' r5 [( v2 F- \( ?var nextStates = results.getItemsByXPath('//Item[@type="Life Cycle State"]');
( y1 D3 g: B' T3 wvar count = nextStates.getItemCount();
$ Q& l* ^+ C' w; A- e9 d& d
% q5 B5 M2 w( a' Xvar oSelect = document.getElementById('mySelect');
: \" H8 p( l7 U5 zfor (var i=0; i<count; ++i) {   ?" [) P3 e" J+ o2 X
  var item = nextStates.getItemByIndex(i); - U6 Q0 J+ [; j! A$ m, X
  var opt  = document.createElement('option');
. W! p& v, d% e# _% `: {  opt.text = item.getProperty('name'); ) l3 O3 G" D1 C6 d5 y
  oSelect.add(opt);
7 ]1 b  x3 Q! ]} 8 ~5 d: t* Z7 [' B4 t; U$ y! @
9 ~4 w% q4 Y/ P3 W6 B6 z
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了