Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Running a Command at Drawing Startup

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
douglas_sellars
267 Views, 5 Replies

Running a Command at Drawing Startup

I have a LISP script that is set to automatically run when each drawing is opened through acaddoc. This LISP basically adds a command for me to use as needed in Civil3D. But it would be beneficial if when opening a drawing, after loading the LISP, it automatically ran the command and answered all the prompts, as it should be exactly the same for every project I am working on. I'm not fluent whatsoever in LISP language so how would I go about adding these prompts to my acaddoc document?

5 REPLIES 5
Message 2 of 6
hippe013
in reply to: douglas_sellars

Can you post your lisp? And also post what the answer would be for each prompt? Maybe it can be re-written without any prompts at all. 

Message 3 of 6
douglas_sellars
in reply to: hippe013

I've attached the lisp file. This was received by another member today so I'm not familiar with the coding portion. The process I would like it to perform:

 

Run "QALL"

Enter Quantize Value: 0.001

Quantize objects even on locked layers?: Y

Message 4 of 6
hippe013
in reply to: douglas_sellars

Add the following to the very bottom of the script that you posted.

(vla-sendcommand (vla-get-activedocument (vlax-get-acad-object)) "QALL 0.001 YES ")
Message 5 of 6
douglas_sellars
in reply to: hippe013

Perfect. Thanks so much for your help. 

Message 6 of 6
hippe013
in reply to: douglas_sellars

Happy to help. 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report