iCAx开思网

标题: UG 能不能启动后,自动执行菜单命令? [打印本页]

作者: 风里密码    时间: 2005-2-22 10:04
标题: UG 能不能启动后,自动执行菜单命令?
AutoCAD 是可以的?
  
不知道 UG 行不行!
  
那位大虾出手,解答一下
作者: 微笑是金    时间: 2005-2-22 10:35

作者: 风里密码    时间: 2005-2-22 10:40
我这里需要做一个 外部程序 来调用 UG
  
希望可以 启动 后 自动执行 UG 的宏 或者 grip 程序,然后 自动退出 UG!
作者: anthony2008    时间: 2005-2-22 10:45
修改UGII\menus\custom_dirs.dat 文件,指定你的startup目录就可以了,试试吧.
作者: Yeager    时间: 2005-2-22 11:38
剛好有兩種方式:
1.
-key:<keystroke file>
  When the <keystroke file> is a macro, this switch causes it to execute when NX starts up. To execute a series of macros, list their names in the <keystroke file>, and give the file a ".lxt" extension. When NX starts, the macro files listed in the .lxt file execute sequentially.
  
Example:
  
ugii -key:start.macro
   
2.
-run
  Specifies that NX is to run a GRIP program. It prevents an interactive version of NX from displaying. Instead, it runs the GRIP program specified on the command line. The -dir, -dev, and -name options are only valid when used with the -run option. For more details about the Gripbatch command line syntax, see Running a GRIP program in the Open GRIP Help.
  
作者: 风里密码    时间: 2005-2-22 12:23
呵呵,感谢 楼上 大哥,试一下先
作者: gaochongjun    时间: 2005-2-22 14:04
请问楼主,这样有什么实际用途请赐教!!
作者: Yeager    时间: 2005-2-26 10:34
舉例一下:
若要求一打開UG,就自動開啟某個樣本檔(Template File),那就必須如此做了!!
1.UG中作個macro,動作為"open xx.prt"=>"進入modeling"
2.以5樓提的方式,啟動UG時同時執行該macro.
  
試試吧....
作者: ggyybon    时间: 2010-4-15 18:06
目前測試5樓所說的方法可以在啟動NX時自動執行MARCO但若想要執行完MARCO後自動將NX關閉,不知道該如何實現,有人有方法嗎?




欢迎光临 iCAx开思网 (https://www.icax.org/) Powered by Discuz! X3.3