Jump to content

override drawing units on startup


samifox

Recommended Posts

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

 

 

Link to comment
Share on other sites

  • 3 weeks later...
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....   ")

 

Link to comment
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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...