• Animation Window
• Loading a Model
• Attaching Results
• Model Object
• Result Control
• Query Control
• Selection Sets
• Groups
Copyright © 2009 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
• It’s important to understand that Animation is just a client type while post
is an actual TCL command created inside the Animation client
Example:
hwi OpenStack
hwi GetSessionHandle session1
session1 GetProjectHandle project1
project1 GetPageHandle page1 1
page1 GetWindowHandle win1 1
win1 SetClientType Animation
hwi CloseStack
Copyright © 2009 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
• After setting the client type, you can access the animation client and get
full access to its functionality using the GetClientHandle command
page1 GetWindowHandle win1 1
win1 GetClientHandle anim
• Remember when working with the client handle, you always have to add
an object first using the appropriate Add command
• (i.e. AddModel, AddMeasure, AddNote and AddSectionCut).
• The Add command returns an ID that you should use to get the proper
handle
• if you have a model loaded in the window and you need to load a new
model (not overlay), then you can use the Clear command.
anim Clear
anim AddModel bumper_foam.h3d
anim Draw
• To attach results to the loaded model, you first need to get a model
handle using the GetModelHandle command available in the post
object.
• At this point, we have a model and its results loaded. We can animate
and/or view results such as contour, tensor, and vector plots.
Copyright © 2009 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Exercise 4.1
• When working within the HyperView GUI, there is only one active model
within a session at any given time.
• However, when working with the command layer, you can work with any
model that’s loaded in the session.
• You are not restricted to the active model only – as long as you get the
proper model handle.
Copyright © 2009 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
• The result control handle allows you to query information such as:
• load cases
• simulation steps
• data types
• It also allows you to apply results such contour, tensor and vector plots
and other features.
• Example: Get a list of data types for the current load case (also referred
to as subcase).
anim GetModelHandle my_model [anim GetActiveModel]
my_model GetResultCtrlHandle my_result
set current [my_result GetCurrentSubcase]
set data_types [my_result GetDataTypeList $current]
Copyright © 2009 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
• The query control allows you to query or get information for all entity
types in the model. Aside form basic information you can also query
results, such as stress values, displacements, etc…
• First need to get a query control handle and then perform the desired
query.
• When working with the query control you have to remember the following:
• Choose the entity type (i.e. node, element, component or system)
• Specify the request (i.e. “node.id”, “contour.value” etc…)
• Specify a set of entities that you need information for (i.e. all nodes, or IDs
100-200, or all entities above/below a certain contour value, etc…)
• Output the data to a file or any other channel
Copyright © 2009 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
• Almost all result related objects (contour, tensor, vector, fld, etc…) as
well as other controls, such as the exploded view and query, require a
selection set.
• In addition, you can reverse the selection and even add by contour value
for example.
• Example (continued): So now we are left with a selection set that has
the following IDs: 50 60 70 80 90 and 100.
• Let’s add all elements that are adjacent to the elements in the set.
• After creating this group, you can go to the Groups Panel and turn the
display on/off or change other options.
Copyright © 2009 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Exercise 4.2
Exercise 4a
Description:
Handles used
Hints
Use the session to capture screen and then set the active window to
capture the individual windows.
Copyright © 2009 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Exercise 4b
Description:
Handles used
Hints
Use the GetSize command on the selection set handle to get the number
of elements in the selection set.