0

I am running an .arx application in AutoCAD. When we click on the customized tab in AutoCAD it runs the program in AutoCAD's commandline. The LISP function that we execute is as follows;

(defun c:XYZ_program() 
  (command)
  (command)
  (arxload "C:/ABC/XYZ.arx")
  (command "XYZ_program")
  (arxunload "XYZ.arx"))

The process that I need to execute is "LOAD the .arx"--> "Execute it fully" --> "UNLOAD .arx"

Now when I run this for menu based input driven .arx, it works fine, but when some programs need input from AutoCAD's command line, it gives an error saying "unload failed".

I believe the process taking place here is "Load arx" --> "RUNNING through command line" --> "RUNS before arx is executed fully. and so gives an error."

Any help with this would be highly appreciated.

4

1 回答 1

3

我确实从更多的研究和帮助中得到了答案。

在 LISP 中顺序执行命令的方式,我们可以使用(progn expr ....)

但是,如果某些程序采用命令行输入,这可能无济于事。上述问题专门针对 AutoCAD 和 .arx 应用程序,因此我们可以在 VC++ 程序中包含以下行。

ads_queueexpr(_T("(arxunload \"XYZ\")") ); 

希望这可以帮助。

于 2013-07-15T20:39:16.207 回答