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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...