课件说明教案2hyperworks_第1页
课件说明教案2hyperworks_第2页
课件说明教案2hyperworks_第3页
课件说明教案2hyperworks_第4页
课件说明教案2hyperworks_第5页
已阅读5页,还剩15页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论