1. FIND_MACRO_FROM_COMMAND(STRING): 通过宏命令找到宏所在位置
2. DEFAULT_GROUND($_topgui.model): 获取默认地面Part
3. DB_DEFAULT(.System_Defaults,”Model”)': 默认值
4. prod_info(“raw_product”)': 获取当前Adams产品种类
5. DB_CHILDREN($_self, “Variable”):获取子集
6. acar toolkit warning warning=(eval(“message”))
7. obj_exists(db_default(system_defaults,”model”),”part_name”)
8. USER_STRING(“.model.part.marker.location”): 获取用户输入的位置等内容。
cond=(USER_STRING(‘$f_body.ground_part’)!=’True’)
9. for var=$_topgui.loopObj obj=(eval(db_children($_topgui,”GRaphic_Interface_Field”)): 循环界面上所有Field控件
10. symmetric_obj($_topgui.current_element).ref_marker: 获取对称位置的OBJECT
11. STR_CHAR_SWAP(“r”,”lrrl”,1): 用于获取对称字符
12. DB_MOVE(marker, new_part)': 移动所属的父类
13. ACAR.variables.vehicle_left@{1,2,3}:向量相乘之和
14. symmetry({x,y,z}):对称位置坐标
15. db_ancestor(object, “part”): 获取父类中part的object
16.simulation set solver_preference = internal 设置使用内部Solver
17.删除UDE:assembly delete instance_name 或者 entity delete entity
18.添加图片:var set var=.db_base.variables.i int=(eval(PUTENV( "MDI_AVIEW_BITMAPS",getenv("MDI_AVIEW_BITMAPS")//";"//getenv("db_base")//"/bitmap")))
interface label create icon_file = "nikon.png"
19. 删除文件:variable set variable=$_self.tmpret int=(eval(remove_file($_self.tmprptfil)))
20. 询问对话框:variable set variable = $_self.yes_no_cancel int = (eval(alert(\"Information\",\"Save the property file?\",\"Yes\",\"No\",\"Cancel\",2)))
100.将宏写到文本的方法:
[sourcecode language='bash' padlinenumbers='true' collapse='false']
file text open file=".ACAR.macros.mac_ana_act_sub.txt" open_mode=overwrite
file text write format="%s" newline=yes value=(eval(user_string(".ACAR.macros.mac_ana_act_sub.commands_to_be_executed")))
file text close file=".ACAR.macros.mac_ana_act_sub.txt"
[/sourcecode]
免责声明:本文系网络转载或改编,未找到原创作者,版权归原作者所有。如涉及版权,请联系删