版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Chapter 2: The HyperWorks Desktop EnvironmentHyperWorks Desktop Environment - OverviewFramework OverviewCommand LayerSample SessionObject HierarchyDocumentationCommand WindowHyperWorks Desktop Environment - Framework OverviewHyperWorks Desktop framework contains:HyperViewMotionViewHyperGraphHyperGra
2、ph 3DTextViewMediaViewFE ModelOther HyperWorks applications that can be accessed through the HyperWorks Desktop:HyperMeshManufactoring SolutionsData ManagerProcessManagerHyperStudyOptiStructHyperWorks Desktop Environment - Framework OverviewHyperWorks Desktop Environment - Framework OverviewTcl/Tk i
3、s the scripting language used to customize the HyperWorks Desktop Environment.Upon launching, the Tcl/Tk interpreter is automatically initialized and a set of commands are created to form the command layer inside the framework. Every client in the HyperWorks Desktop framework has a command associate
4、d with it. Each of these commands is created when the respective client is loaded.“post”Animation client“hwplot” HyperGraph 2D client“plot3d”HyperGraph 3D client“texteditor”TextView client“video”MediaView client“model”MotionView clientHyperWorks Desktop Environment - Framework OverviewWhat is a macr
5、o?Tool, utility, or a set of functions that perform a particular action or a set of actions Tcl scripts that are created using Tcl must have a name with “.tcl” extension. To activate a particular Macro, the user must use the source command. For example, a Macro named my_macro.tcl, use the following
6、command:source my_macro.tclHyperWorks Desktop Environment Command LayerThe Command Layer is formed from native Tcl/Tk commands and a set of HyperWorks Desktop specific commandsAccessible and available to all clients available inside the HyperWorks Desktop framework.Follow a simple and consistent syn
7、tax. The command layer can basically be broken into two main levels common level client specific level The same commands are used to get to the client level and after that, a separate set commands exist for each client. HyperWorks Desktop Environment Command LayerAll commands are object-centric, mea
8、ning that you must have an object to which a command can be applied. The basic command syntax is:object_name command command parameter(s)These commands fall into four categories Handle CommandsOperation CommandsProperty CommandsList CommandsHyperWorks Desktop Environment Command LayerThe HyperWorks
9、database consists of a hierarchy of objectsThe foundation is the hwi (HyperWorks Interface) objectAutomatically created. The hwi command provides access to the hwISession object and a few high level utilities. HyperWorks supports only one session per run and one project per session. The session obje
10、ct can be retrieved by using the following commandhwi GetSessionHandle session1NOTE: session1 is the handle name which is an arbitrary name chosen by the userHyperWorks Desktop Environment Sample SessionSample session with 2 pages:HyperWorks Desktop Environment Sample SessionExample: Get to “Page 2”
11、 and set its title to “My page”session1 GetProjectHandle project1project1 GetPageHandle page2 2page2 SetTitle “My page” Client type is assigned to a windowA windows client type cannot be changed after the client handle has been retrieved. The client handle must be released and retrieved again if the
12、 windows client type is changed. Example: Get to window 1 in page 1 and set the client type to animationproject1 GetPageHandle page1 1page1 GetWindowHandle win1 1win1 SetClientType AnimationHyperWorks Desktop Environment Object HierarchyThe first level is common to all clients and applies at the fra
13、mework levelHyperWorks Desktop Environment Object HierarchyThe second level is unique to each client inside HyperWorks Desktop. Commands may have the same syntax, it doesnt mean that they are common to other clients. Efforts have been made to keep consistency for similar command keep things simpleea
14、sier to learn An example:SetColor or SetLabel commandFind them available in more than one object and in different clients. HyperWorks Desktop Environment Object HierarchyAnimation Client Object HierarchyHyperWorks Desktop Environment Object HierarchyPlot 2D Client Object HierarchyHyperWorks Desktop
15、Environment DocumentationDocumentation in Online HelpProgramming with Tcl/Tk CommandsHyperWorks Desktop Environment Command WindowTo access Tcl/Tk and the command layer inside HyperWorks Desktop, launch the Command Window Click on Views menu item and then choose Command Window Provides an interactiv
16、e environment and it also allows users to load and save file TCL files, also known and scripts, as well as saving a history of recent commands or scripts.HyperWorks Desktop Environment Command WindowWorking with Command Window:To load a script (TCL file), use File Load File menu item, or you can sim
17、ply type “source filename.tcl” in the console.When typing a handle, you can use the tab key for plete feature.Text highlighting is supported. All global commands are highlighted in green and error code is highlighted in red.You can click on an error (red text) to launch a new window displaying the s
18、tack trace; this is very useful feature for debugging purposes.Use the Up/Down arrow keys to go through commands in the historyAll menu items are accessible via pop up menu using the right mouse buttonCopy and paste is supported via menu items, but also available by highlighting any text and then using the middle mouse button to paste (similar to UNIX functionality)Use clear command to clear all text form the consoleExercise 2.1 Changing the Client Type using the Command WindowHyperWorks Desktop Environment ExerciseExercise 2aDescription: Start HyperWorks Desktop and launch the co
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年文学鉴赏与批评题库古代文学与现代文学对比
- 2026年程序员面试笔试题目及答案编程逻辑与算法应用
- 2026年法律案例分析与应用模拟测试题
- 北京市海淀清华附中2026届高一下生物期末联考试题含解析
- 2026年食品药品安全知识考试题及答案公布
- 2026年计算机二级C语言编程基础与算法应用题库
- 2026年办公软件高级应用与操作技巧测试
- 2026年电力工程建设项目管理题库
- 2026年软件工程师进阶面试全模拟题
- 2026年历史常识与文化知识考试题集
- 2025年煤制天然气行业研究报告及未来发展趋势预测
- 外伤性脑出血病例分析与管理流程
- 食堂设计投标方案(3篇)
- 产前筛查设备管理制度
- 初级意大利语教程课件
- DB13-T2321-2015-盐碱地高粱咸水直灌栽培技术规程-河北省
- 木工机械日常点检表
- 市域治理现代化的培训课件
- 专家解析:渲染,烘托等的区别课件
- 东方希望(三门峡)铝业有限公司煤焦油脱水技改项目环评报告
- 20S517 排水管道出水口
评论
0/150
提交评论