Jest Posted April 16, 2021 Posted April 16, 2021 I need a Lisp routine to reset scalelist to default in current drawing. I have my custom default scale list and set it as default. But when I open new drawing, I have to reset scale list if I want to use my custom defaults. So, I would like to put this procedure in just one shortcut..... "SCALELISTEDIT - Reset - Metric scales - OK" Quote
Dana W Posted April 16, 2021 Posted April 16, 2021 I'd go KISS on this one and set up a template drawing with my "custom" scale list already in it. No lisp required. 1 Quote
Jest Posted April 16, 2021 Author Posted April 16, 2021 It is true...but when I open someone else drawing (happens very often), then this routine could be useful... Quote
pkenewell Posted April 16, 2021 Posted April 16, 2021 (edited) (command "._-SCALELISTEDIT" "_Reset" "_Yes" "_Exit") This will reset the current scale list but it will not change to Metric defaults. I don't know of a way to change the defaults. I would've thought this would be in the "UserPreferences" ActiveX object, but no property is exposed for this in Visual Lisp as far as I can tell. Maybe it is settable in the Registry? EDIT - As far as I can tell by my research. There is no way to reset Metric defaults via Lisp. What other users have done is just write a program to recreate the entire scale list to their choosing, even if to match the default scale list. See the attached file I found on the Autodesk Forums - not sure who the original author is. scalelistreset.lsp Edited April 16, 2021 by pkenewell 1 Quote
Jest Posted April 16, 2021 Author Posted April 16, 2021 Thanks I don't know much about creating lisps, so I didn't expect it is not so simple... There is my process in four steps, for which I hoped it can be joined into one simple command... Thanks for your effort to help me anyway! Quote
ronjonp Posted April 16, 2021 Posted April 16, 2021 (edited) This seems to work: (setvar 'measurement 1) (command "._-SCALELISTEDIT" "_Reset" "_Yes" "_Exit") Edited April 16, 2021 by ronjonp 3 Quote
pkenewell Posted April 19, 2021 Posted April 19, 2021 On 4/16/2021 at 3:45 PM, ronjonp said: This seems to work: (setvar 'measurement 1) (command "._-SCALELISTEDIT" "_Reset" "_Yes" "_Exit") Cool! I didn't realize that the Measurement variable would force the scale list as well as the linetypes and hatches! Thanks for the insight Ronjonp. Quote
Jest Posted April 19, 2021 Author Posted April 19, 2021 Great...that's what I need. Thank's for help, both of you. Quote
ronjonp Posted April 19, 2021 Posted April 19, 2021 1 hour ago, pkenewell said: Cool! I didn't realize that the Measurement variable would force the scale list ... Me either until I tried it 1 Quote
ronjonp Posted April 19, 2021 Posted April 19, 2021 1 hour ago, Jest said: Great...that's what I need. Thank's for help, both of you. Glad to help 1 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.