Beruflich Dokumente
Kultur Dokumente
Innovation
Desktop Environment
Intelligence®
1
Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
• Framework Overview
• Command Layer
• Sample Session
• Object Hierarchy
• Documentation
• Command Window
2
Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
3
Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
4
Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
5
Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
• What is a macro?
• 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 command:
source my_macro.tcl
6
Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
• The Command Layer is formed from native Tcl/Tk commands and a set
of HyperWorks Desktop specific commands
• Accessible and available to all clients available inside the HyperWorks
Desktop framework.
• Follow a simple and consistent syntax.
• 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.
7
Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
• All commands are object-centric, meaning that you must have an object
to which a command can be applied.
8
Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
• HyperWorks supports only one session per run and one project per
session.
9
Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
10
Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
• Example: Get to window 1 in page 1 and set the client type to animation
project1 GetPageHandle page1 1
page1 GetWindowHandle win1 1
win1 SetClientType "Animation"
11
Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
The first level is common to all clients and applies at the framework level
12
Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
• Commands may have the same syntax, it doesn’t mean that they are
common to other clients.
• An example:
• SetColor or SetLabel command
• Find them available in more than one object and in different clients.
13
Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
• Animation Client
Object Hierarchy
14
Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
• Plot 2D Client
Object Hierarchy
15
Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
• Documentation in
Online Help
16
Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
17
Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
18
Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Exercise 2.1
19
Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Exercise 2a
Description:
Handles used
set
Hints
20