1

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.

2

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.