Jump to content
samifox

override drawing units on startup

Recommended Posts

samifox

hi

 

I open lots of drawing that comes from different authors and their units setting varied, every time I need to open units dialog box and set it to the way I prefer. 

 

I want to write it in an SCR or DIESEL script and load it automatically with each drawing.

 

what is the best method to write it and to load it with each drawing that I open?

THanks

 

 

Share this post


Link to post
Share on other sites
BIGAL

Search here for startup, autoload, acaddoc.lsp holds the answer.

Share this post


Link to post
Share on other sites
rkmcswain
On 9/14/2018 at 1:09 AM, samifox said:

hi

 

I open lots of drawing that comes from different authors and their units setting varied, every time I need to open units dialog box and set it to the way I prefer. 

 

I want to write it in an SCR or DIESEL script and load it automatically with each drawing.

 

what is the best method to write it and to load it with each drawing that I open?

THanks

 

 

 

Is there some reason you are saying SCR or DIESEL only?

This is exactly what the "Acaddoc.lsp" file is for. You can put your variable settings in there and it will execute whenever a drawing is loaded. AutoCAD only loads the first "Acaddoc.lsp" it finds based on the order of the support file search path, so you can get creative about the location of this file to accomplish specific tasks.

 

Example:

(setvar "luprec" 4)
(setvar "lunits" 4)
(setvar "unitmode" 1)
(princ "Acaddoc.lsp loaded....   ")

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×