Jump to content

Reset Scalelist to default


Jest

Recommended Posts

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"

Link to comment
Share on other sites

(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 by pkenewell
  • Like 1
Link to comment
Share on other sites

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

Capture.thumb.PNG.51d07634f62c8fa783dbad76eb293d41.PNG

 

Thanks for your effort to help me anyway!

 

Link to comment
Share on other sites

This seems to work:

(setvar 'measurement 1)
(command "._-SCALELISTEDIT" "_Reset" "_Yes" "_Exit")

 

Edited by ronjonp
  • Like 3
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 :)

  • Like 1
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...