Rahul
Rahul

Reputation: 1110

How to load .fas file and run command on every drawing load in autocad2012?

Hello I am using Autocad2012 and I am trying to load a simple "XYZ.fas" file in autocad and want to run the command "XYZ" on every drawing load. I have tried adding the XYZ.fas in the Startup Suite and in acaddoc.lsp I wrote the following code:

(defun S::STARTUP()
(command "XYZ")
)

and by doing this only half of the job is done only the .fas file is loaded but it is not accepting the command. but if I write the command manually its running smoothly. Really hard for me to understand where I am wrong any help will be appreciated. Thank you

Upvotes: 1

Views: 1732

Answers (1)

user6376536
user6376536

Reputation:

Add this to your ACDOC.LSP file.

(setq dir "C:/LISP")
(load (strcat dir "/XYZ.fas")
(c:XYZ)

Upvotes: 0

Related Questions