实例介绍
ansoft14软件 脚本编写 电机设计 软件自动化
Introduction to Scripting in Maxwell Getting Help Ansoft Technical Support To contact Ansoft technical support staff in your geographical area pleaselogontotheAnsoftcorporatewebsitehttp://www.ansoft.com click the Contact button, and then click Support. Your Ansoft sales engi neer may also be contacted in order to obtain this information E-mail can work well for technical support. All Ansoft software files are ASCI text and can be sent conveniently by e-mail. when reporting diffi culties, it is extremely helpful to include very specific information about what steps were taken or what stages the simulation reached this allows more rapid and effective debugging Introduction to scripting in Maxwell Table of contents 1. Introduction to VBScript Sample Maxwell Script VBScript Variables .1-5 Declaring Variables 1-5 Variable Naming Conventions Scope and Lifetime of variables 1-6 Array variables 1-6 VBScript Operators ■■1m重 Operator Precedence .1-8 Arithmetic Operators Comparison operators Logical operators Controlling Program EXecution 1-10 Using If.. Then .Else Using Select Case....….…1-10 Looping Through Code 1-11 Using a For... Next Loop ...1-11 Using a Do Loop ,,,,,,,,,,,,,1-11 Repeating Statements While a Condition is True 1-11 Repeating a statement Until a Condition Becomes true. 1-11 VBScript Procedures .1-12 Introduction to scripting in Maxwell Function procedures .1-12 Sub procedures ...,1-12 Converting Between Data Types 1-12 Interacting with a Script 1-13 Recommended VBScript References 1-13 2. Maxwell and VBScript Overview of Maxwell script variables .,2-2 Recording a script 2-5 Stopping Script Recording 2-5 Running a Scri 2-6 Pausing and resuming a Script ..,27 Stopping a Scrip 2-7 Maxwell Scripting Conventions 2-7 Syntax Conventions 2-7 Script Command Conventions 2-8 Named Arguments 2-9 Setting numerical values 2-10 EXecuting a Script from Within a Script 2-11 Editing Properties 2-11 3. Ansoft Application Object Script Commands General Application Script Commands........ 3-2 GetAppDesktop 3-2 SetDesiredRamMbLimit 3-2 SetMaximumRamMBLimit 3-2 SetNumberofprocessors 3-3 GetDesiredRammbLimit 3-3 GetMaximum Ram MBLimit 3-4 GetNumberofProcessors 4 4. Desktop Object Script Commands General Desktop Script Commands 3-2 CloseAlwindows 3-2 CloseProject 3-3 Contents-2 Introduction to Scripting in Maxwell CloseProjectNoForce EnableAutosave 3-3 GetActive Project 3-3 GetLibrary Direct 3-4 GetProjectDirectory ....,3-4 GetProjectLi 3-4 GetTempDirectory 3-4 GetVersion 3-4 NewProject .3-5 OpenMultiple Projects 3-5 Open Project 3-5 Pause Script 3-6 3-6 QuitApplicat 3-6 Restore Window RunProgram 3-7 Run Script SetActiveProjec 3-8 SetActive ProjectBy Path 3-8 Setlibrary directe etProjectDirectory 3-9 SetTempDirectory 3-9 Sleep ...,,3-9 Commands for Querying Objects Count 3-10 GetDesigns 3-11 GetDistributed analysisMachines 3-11 GetName(Desktop) GetProjects 3-11 5. Project Object Script Commands General Project Object Script Commands 4-2 GetName(Project) 4-2 GetPath 4-2 Introduction to Scripting in Maxwell GetActive Desig 4-3 SetActiveDesign 4-3 GetT op DesignLis 4-3 GetDesign 4-3 Close 4-4 Save 4-4 aveAs 4-4 InsertDesign Copy Design 4-5 Paste(Project) 4-6 CutDesign 4-6 Delete Design 4-6 Undo( project) 4-6 Redo( project) 4-7 AnalyzeAll(Project menu) 4-7 6. Material Script Commands Material Level Script Commands 5-2 Add matel 5-2 Does MaterialExist 5-3 Editmaterial 5-4 ExportMaterial Remove material 7. Property Script Commands Conventions Used in the Property Script Chapter 6-2 General Property Scripting Commands .6-4 Change Property 6-4 Callback Scripting Using PropHost object ,,6-10 PropHost Functions 6-13 AddMenuProp 6-13 AddMenuProp2 6-14 AddProp .6-14 Add Prop2 6-14 Contents Introduction to Scripting in Maxwell Execute Script 6-15 Getcallback 6-15 GetChanged Property 6-15 GetDescription·… 6-15 GetEditor ....6-16 GetFileName 6-16 Gethidden 6-16 GetPropServers 6-16 GetPropTabType 6-17 GetReadOnly 6-17 GetTabTypeName 6-17 GetText 6-17 GetVal 6-18 PropertyEXists 6-18 Remove Prop 6-18 Setcallback 6-18 SetDescription 6-19 Sethidden 6-19 SetReadonly 6-19 SetText 6-19 Setvalue 6-19 Additional Property Scripting Commands 6-21 GetProperty Value 6-21 SetProperty value 6-21 GetProperties 6-22 Getvariable∨alue. 6-22 Setvariablevalue 6-23 Getvariables 6-23 Additional Property Scripting EXample ..,6-24 EXample: Using Record Script and Edit Properties 6-25 8. Dataset Script Commands General Dataset Script Commands 7-2 AddDataset 7-2 Introduction to Scripting in Maxwell EditDataset 7-2 Delete Dataset 7-3 9. Design Object Script Commands Conventions Used in the Design Object Chapter .8-2 General Design Object Script Commands ,,8-3 GetName(Design) 8-3 GetModule 8-4 SetDesign Settings 8-4 De|ete∨ ariation 8-6 SetSolution Type 8-7 SetActiveEditor 8-7 Solve 8-8 Undo ( design) 8-8 Redo( Design) 8-8 Rename DesignInstance 8-8 Apply MeshOps 8-9 Editnote 8-9 AnalyzeAll( Maxwell menu) 8-10 AnalyzeAlINominal 8-10 Analyze 8-10 AnalyzeDistributed 8-10 Setconductivity threshold 8-11 EXportConvergence 8-11 GetVariation variablevalue 8-12 ExportMesh Stats 8-12 ExportProfile .8-13 GetNominalvariation 8-14 Is2D 8-144 IS3D ..8-14 GetOutputVariable Value, AddOutput Variable, EditoutputVari- able, DeleteOutputVariable .8-14 Change Property, GetProperty Value, Set Property Value, Get- Properties, Getvariablevalue setVariablevalue getVariables Contents 【实例截图】
【核心代码】
标签:
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论