- 1、本文档共43页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Workbench Customization 二次开发
Example 1: Get nodal results Sourcecode: var StrAns = DS.Tree.Projects(1).Models(1).Environments(1).AnswerSet.StructuralResults; WBScript.Out (numb of results + StrAns.Count, true); var numNodes = DS.Tree.Projects(1).Models(1).MeshControlGroup.Nodes; WBScript.Out (Number of nodes for model + numNodes, true); var res = null; var i = j = k = num = node = nodesperPart = 0; for (i=1; i=StrAns.Count; i++) { // loop through the result objects WBScript.Out (Result + i + type + StrAns(i).ResultType, true); res = StrAns(i).Arrays; // get the DSResultArray object WBScript.Out (Number of parts + res.Count, true); for (j=1; j=res.Count; j++) { // loop through the parts nodesperPart = res(j).Count; WBScript.Out (Nodes per part + res(j).Count, true); //Get results for all nodes implement k=nodesperPart in this for loop for (k=1; k=1; k++) { // loop through the results WBScript.Out (Node + k + Value + res(j).Value(k), true); } } } Description: StrAns – parent object for structural results WBScript.Out(“string”,true) – output dialog numNodes – number of nodes in this model for loop i: loop trough the result objects StrAns(i).Arrays – get the DSResultarray object for loop j: loop trough the parts res(j).Count – get number of nodes for this part for loop k: loop trough the nodes per part Test this macro: Copy the code to a *.js file Click on Tools ? “Run macro” in DS You see the results with the WBScript.Out dialog Example 2: DesignModeller – manipulate parameters Application: create same models with different dimensions Call the script with ?Run Script“ Button ?Select a parameter file Read this file update automatically the modell with the new parameters Example 2: DesignModeller – manipulate parameters Workbench - Customization Workbench Customization CADFEM Users Meeting 2005 Bundeshaus Bonn Stefan Gotthold CADFEM GmbH Programming in Workbench: Overview The Simulation Wizard JScript Practical
文档评论(0)