第一范文网 - 专业文章范例文档资料分享平台

Chapter-4-Using-Tcl-to-Control-the-HyperMesh-Session-2017-CN第二天下午 - 图文

来源:用户分享 时间:2025/7/5 23:17:32 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

? 2016 Altair Engineering, Inc. Proprietary and Confidential. All rights

reserved.

Basic HyperMesh Input Widgets

?hm_getint和hm_getfloat传递用户输入的数值.

?hm_getintreturns a user input integer value.

?hm_getfloatreturns a user input floating point value. ?Both these commands have the same options as the hm_getstringcommand.

set force [hm_getfloat “Force”“Enter force value”]

6

? 2016 Altair Engineering, Inc. Proprietary and Confidential. All rights

reserved.

Using the Command Window 使用命令栏

?提供了一个交互式命令窗口,可以通过view 菜单访问.

?这将启动Tk Console (TkCon) ,是源自Tk的交互式控制台.

?在Command Window 中, 用户可以执行源自TCL或通过TCL在HM中能执行的任意命令,

?比如ls, pwd, 和cd可以用在Command Window 中.

7

? 2016 Altair Engineering, Inc. Proprietary and Confidential. All rights

reserved.

Using the Command Window

?通用的TCL 和HyperMesh 特有的TCL 也可以在此输入.

?例如, 让我们使用HyperMesh 特有的TCL 命令hm_info 并带有下列选项:

hm_info –appinfo SPECIFIEDPATH TEMPLATES_DIR ???

这将返回当前template 目录.

在编写完整程序之前,使用命令窗口为二次开发人员提供了一种简单的测试概念的方法。

在Command Window 中,你可以…

?执行可以向tcl发出的任何命令,或者执行在HyperMesh中能执行的TCL命令?使用source 命令,执行一个脚本文件, i.e. source test.tcl, or, run scripts using the File>> Loadmenu option

?Save the session’s command history using the File>> Savemenu option (需要在Hyperworks环境中)

8

? 2016 Altair Engineering, Inc. Proprietary and Confidential. All rights

reserved.

Exercise 4.1: Using the Command Window –pg 33

?这个例子的目的是熟练掌握在Command Window中开发tcl的用法

?HyperMesh TCL 和核心TCL 命令用在Command Window ,为之前的HyperMesh 模型在一个component collector指定一系列的网格?练习中使用到的命令:

?Modified HyperMesh commands:

*createmark

?HyperMesh Tcl commands

hm_info

hm_getmark

?Core Tcl commands

listllengthsetsource

9

? 2016 Altair Engineering, Inc. Proprietary and Confidential. All rights

reserved.

Exercise 4.2: Automate Creating Forces with a User Specified Magnitude –pg36?在这个例子中, 我们来执行一遍创建HyperMeshTCL 脚本的通用流程. ?这个脚本将自动创建用户指定大小的Force

?例子中使用了以下命令:

?Modified and added HyperMeshcommands:

*createmark*clearmark

?HyperMeshTCL commands:

hm_getfloat

?Core TCL commands:

set

10

搜索更多关于: Chapter-4-Using-Tcl-to-Control 的文档
Chapter-4-Using-Tcl-to-Control-the-HyperMesh-Session-2017-CN第二天下午 - 图文.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c2i7rm8iyju3cwgi893aj3uh255c6he00c1s_2.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top