سؤال

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.

هل كانت مفيدة؟

المحلول

I did get the answer from some more research and help.

In LISP the way to execute the commands sequentially, we can use (progn expr ....)

However, if some programs take command line input, this might not help. The issue above was specifically with AutoCAD and .arx applications, so we can include the following line in the VC++ program.

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

Hope this helps.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top