Innovation Intelligence ® 1 Chapter 7: The MotionView Client.

Post on 31-Dec-2015

218 views 3 download

transcript

Innovation Intelligence®

1

Chapter 7: The MotionView Client

Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.

22

The MotionView Model Client – Overview

• Model Window• Loading mdl model• Creating blank model• Export a model• Running MotionSolve

• Model Object• Getting the model handle• Adding new entity

• Model Tree

• Grabbing Properties of an entity

• Interpret Properties of an entity

Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.

33

The MotionView Model Client – Model Window

• In any window, you can set the client type to Model• Creates the model object

• Example:hwi OpenStack

hwi GetSessionHandle session1session1 GetProjectHandle project1project1 GetPageHandle page1 1page1 GetWindowHandle win1 1win1 SetClientType Model

hwi CloseStack

Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.

44

The MotionView Model Client – Model Window

• After setting the client type you can access the model client and get full access to its functionality using the GetClientHandle command

page1 GetWindowHandle win1 1win1 GetClientHandle client

• Object Hierarchy for mdlI• The prefix “mdlI” is used internally for naming the classes within the model

client.

• It stands for “model Interface”.

Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.

55

The MotionView Model Client – Model Window

• Load an existing model (mdl) file into the model client• CreateModel command is used• Requires 2 arguments – the filename and type of file

page1 GetWindowHandle win1 1win1 GetClientHandle clientclient CreateModel full_car.mdl mdl

• Create a blank model• CreateBlankModel command is used

page1 GetWindowHandle win1 1win1 GetClientHandle clientclient CreateBlankModel

Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.

66

The MotionView Model Client – Model Window

• Export an existing model• ExportModel command is used• Requires that a filename be given for the file that is bieng written out

page1 GetWindowHandle win1 1win1 GetClientHandle clientclient ExportModel “full_car.xml”

• Run MotionSolve• RunSolverScript command is used• Requires that a filename to which the results should be written to be given

page1 GetWindowHandle win1 1win1 GetClientHandle clientclient RunSolverScript “full_car.xml”