samifox Posted September 14, 2018 Posted September 14, 2018 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 Quote
BIGAL Posted September 17, 2018 Posted September 17, 2018 Search here for startup, autoload, acaddoc.lsp holds the answer. Quote
rkmcswain Posted October 3, 2018 Posted October 3, 2018 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.... ") Quote
Recommended Posts
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.