See the top rated post in this thread. Click here

Results 1 to 10 of 10

Thread: Set a custom Scale List via the registry

  1. #1
    Member
    Join Date
    2015-10
    Posts
    21
    Login to Give a bone
    0

    Default Set a custom Scale List via the registry

    Good morning,

    I'm attempting to utilize a custom scale list that I've created for use throughout our company. We have a deployment script that will accomplish this by overwriting everyone's registry bat file, but I first wanted to test it on one pc to ensure it's what I want. I first edited my C3D 2018 scale list in "HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R22.0\ACAD-1000:409\Scale List" . Our IT guru then exported that out and merged it with the scale list in the C3D 2018 registry on his pc so we could examine it. However, when he subsequently opened his C3D (we were did this in both C3D 2017 and 2018 ), his scale list was unaffected. For this reason, I feel we must be missing a step somewhere. Anyone have any thoughts?

    Thanks, Tom
    Last edited by BlackBox; 2019-08-20 at 03:13 PM.

  2. #2
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL
    Posts
    3,199
    Login to Give a bone
    0

    Default Re: Set a custom Scale List via the registry

    Have you clicked [Reset] in the SCALELISTEDIT dialog box yet?
    Tom Beauford P.S.M. - Civil 2019 on Windows 10 Enterprise
    Design Analysis - Leon County Public Works/Engineering Wrap [CODE] tags around selected text
    2280 Miccosukee Rd. Tallahassee, FL 32308-5310
    Ph# (850)606-1516 Home Page

  3. #3
    Member
    Join Date
    2015-10
    Posts
    21
    Login to Give a bone
    0

    Default Re: Set a custom Scale List via the registry

    Thanks for the reply...that simply resets everything back to default, and not the reg values...

  4. #4
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL
    Posts
    3,199
    Login to Give a bone
    0

    Default Re: Set a custom Scale List via the registry

    I've used a custom version of PersonalMtextSymbols.LSP ver 1.0 By Jimmy Bergmark to do this since they were added to the Windows Registry. http://jtbworld.com/autocad-personalmtextsymbols-lsp
    Warning changes to the Windows Registry are permanent!
    I've commented out the added Mtext symbols. Use or modify at your own risk!
    Code:
    ;;; PersonalMtextSymbols.LSP ver 1.0
    ;;; Add personal mtext symbols in the right click menu in the mtext editor
    ;;; By Jimmy Bergmark
    ;;; Copyright (C) 1997-2004 JTB World, All Rights Reserved
    ;;; http://jtbworld.com/autocad-personalmtextsymbols-lsp
    ;;; E-mail: info@jtbworld.com
    ;;; Tested on AutoCAD 2002 - 2009
    ;;; (load "PersonalMtextSymbols.LSP") PersonalMtextSymbols
    ;;; Remember that you can change the contents to whatever you would like
    ;;; The syntax is:
    ;;; (vl-registry-write key "Name <1,2,3...n>" "<Description>")
    ;;; (vl-registry-write key "Contents <1,2,3...n>" "<Value>")
    ;;; Command line: (load "PersonalMtextSymbols.lsp")
    (defun PersonalMtextSymbols ()
      (vl-load-com)
      (setq key (strcat "HKEY_CURRENT_USER\\" (vlax-user-product-key) "\\Profiles\\" (getvar "cprofile") "\\Dialogs\\AcLayerApps:LayerStatesManager"))
      (vl-registry-write key "LayerNotFound" "0");	Layer States Manager - Do not turn off layers not found in layer state
    ;  (setq key (strcat "HKEY_CURRENT_USER\\" (vlax-user-product-key) "\\MTEXT\\Symbols"))
    ;  (vl-registry-write key "Name 1" "%%0215 \U+00D7")
    ;  (vl-registry-write key "Name 2" "%%0247 \U+00F7")
    ;  (vl-registry-write key "Name 3" "%%172  \U+00BC")
    ;  (vl-registry-write key "Name 4" "%%171  \U+00BD")
    ;  (vl-registry-write key "Name 5" "%%0190 \U+00BE")
    ;  (vl-registry-write key "Name 6" "%%0133 \U+2026")
    ;  (vl-registry-write key "Contents 1" "×")
    ;  (vl-registry-write key "Contents 2" "÷")
    ;  (vl-registry-write key "Contents 3" "¼")
    ;  (vl-registry-write key "Contents 4" "½")
    ;  (vl-registry-write key "Contents 5" "¾")
    ;  (vl-registry-write key "Contents 6" "…")
      (setq key (strcat "HKEY_CURRENT_USER\\" (vlax-user-product-key) "\\Scale List"))	; Use 2013 function
      (vl-registry-write key " 0.ScaleDrawingUnits" "1.00000000")
      (vl-registry-write key " 0.ScaleName" "1\" = 1'")
      (vl-registry-write key " 0.ScalePaperUnits" "1.00000000")
      (vl-registry-write key " 0.ScaleType" "3")
      (vl-registry-write key " 1.ScaleDrawingUnits" "5.00000000")
      (vl-registry-write key " 1.ScaleName" "1\" = 5'")
      (vl-registry-write key " 1.ScalePaperUnits" "1.00000000")
      (vl-registry-write key " 1.ScaleType" "2")
      (vl-registry-write key " 2.ScaleDrawingUnits" "10.00000000")
      (vl-registry-write key " 2.ScaleName" "1\" = 10'")
      (vl-registry-write key " 2.ScalePaperUnits" "1.00000000")
      (vl-registry-write key " 2.ScaleType" "2")
      (vl-registry-write key " 3.ScaleDrawingUnits" "20.00000000")
      (vl-registry-write key " 3.ScaleName" "1\" = 20'")
      (vl-registry-write key " 3.ScalePaperUnits" "1.00000000")
      (vl-registry-write key " 3.ScaleType" "2")
      (vl-registry-write key " 4.ScaleDrawingUnits" "30.00000000")
      (vl-registry-write key " 4.ScaleName" "1\" = 30'")
      (vl-registry-write key " 4.ScalePaperUnits" "1.00000000")
      (vl-registry-write key " 4.ScaleType" "2")
      (vl-registry-write key " 5.ScaleDrawingUnits" "40.00000000")
      (vl-registry-write key " 5.ScaleName" "1\" = 40'")
      (vl-registry-write key " 5.ScalePaperUnits" "1.00000000")
      (vl-registry-write key " 5.ScaleType" "2")
      (vl-registry-write key " 6.ScaleDrawingUnits" "50.00000000")
      (vl-registry-write key " 6.ScaleName" "1\" = 50'")
      (vl-registry-write key " 6.ScalePaperUnits" "1.00000000")
      (vl-registry-write key " 6.ScaleType" "2")
      (vl-registry-write key " 7.ScaleDrawingUnits" "60.00000000")
      (vl-registry-write key " 7.ScaleName" "1\" = 60'")
      (vl-registry-write key " 7.ScalePaperUnits" "1.00000000")
      (vl-registry-write key " 7.ScaleType" "2")
      (vl-registry-write key " 8.ScaleDrawingUnits" "100.00000000")
      (vl-registry-write key " 8.ScaleName" "1\" = 100'")
      (vl-registry-write key " 8.ScalePaperUnits" "1.00000000")
      (vl-registry-write key " 8.ScaleType" "2")
      (vl-registry-write key " 9.ScaleDrawingUnits" "200.00000000")
      (vl-registry-write key " 9.ScaleName" "1\" = 200'")
      (vl-registry-write key " 9.ScalePaperUnits" "1.00000000")
      (vl-registry-write key " 9.ScaleType" "2")
      (vl-registry-write key " 10.ScaleDrawingUnits" "300.00000000")
      (vl-registry-write key " 10.ScaleName" "1\" = 300'")
      (vl-registry-write key " 10.ScalePaperUnits" "1.00000000")
      (vl-registry-write key " 10.ScaleType" "2")
      (vl-registry-write key " 11.ScaleDrawingUnits" "400.00000000")
      (vl-registry-write key " 11.ScaleName" "1\" = 400'")
      (vl-registry-write key " 11.ScalePaperUnits" "1.00000000")
      (vl-registry-write key " 11.ScaleType" "2")
      (vl-registry-write key " 12.ScaleDrawingUnits" "500.00000000")
      (vl-registry-write key " 12.ScaleName" "1\" = 500'")
      (vl-registry-write key " 12.ScalePaperUnits" "1.00000000")
      (vl-registry-write key " 12.ScaleType" "2")
      (vl-registry-write key " 13.ScaleDrawingUnits" "600.00000000")
      (vl-registry-write key " 13.ScaleName" "1\" = 600'")
      (vl-registry-write key " 13.ScalePaperUnits" "1.00000000")
      (vl-registry-write key " 13.ScaleType" "2")
      (vl-registry-write key " 14.ScaleDrawingUnits" "1000.00000000")
      (vl-registry-write key " 14.ScaleName" "1\" = 1000'")
      (vl-registry-write key " 14.ScalePaperUnits" "1.00000000")
      (vl-registry-write key " 14.ScaleType" "2")
      (vl-registry-write key " 15.ScaleDrawingUnits" "5280.00000000")
      (vl-registry-write key " 15.ScaleName" "1\" = mile")
      (vl-registry-write key " 15.ScalePaperUnits" "1.00000000")
      (vl-registry-write key " 15.ScaleType" "2")
      (vl-registry-write key " 16.ScaleDrawingUnits" "1.00000000")
      (vl-registry-write key " 16.ScaleName" "1:1")
      (vl-registry-write key " 16.ScalePaperUnits" "1.00000000")
      (vl-registry-write key " 16.ScaleType" "5")
      (vl-registry-write key " 17.ScaleDrawingUnits" "2.00000000")
      (vl-registry-write key " 17.ScaleName" "1:2")
      (vl-registry-write key " 17.ScalePaperUnits" "1.00000000")
      (vl-registry-write key " 17.ScaleType" "4")
      (vl-registry-write key " 18.ScaleDrawingUnits" "4.00000000")
      (vl-registry-write key " 18.ScaleName" "1:4")
      (vl-registry-write key " 18.ScalePaperUnits" "1.00000000")
      (vl-registry-write key " 18.ScaleType" "4")
      (vl-registry-write key " 19.ScaleDrawingUnits" "5.00000000")
      (vl-registry-write key " 19.ScaleName" "1:5")
      (vl-registry-write key " 19.ScalePaperUnits" "1.00000000")
      (vl-registry-write key " 19.ScaleType" "4")
      (vl-registry-write key " 20.ScaleDrawingUnits" "8.00000000")
      (vl-registry-write key " 20.ScaleName" "1:8")
      (vl-registry-write key " 20.ScalePaperUnits" "1.00000000")
      (vl-registry-write key " 20.ScaleType" "4")
      (vl-registry-write key " 21.ScaleDrawingUnits" "10.00000000")
      (vl-registry-write key " 21.ScaleName" "1:10")
      (vl-registry-write key " 21.ScalePaperUnits" "1.00000000")
      (vl-registry-write key " 21.ScaleType" "4")
      (vl-registry-write key " 22.ScaleDrawingUnits" "16.00000000")
      (vl-registry-write key " 22.ScaleName" "1:16")
      (vl-registry-write key " 22.ScalePaperUnits" "1.00000000")
      (vl-registry-write key " 22.ScaleType" "4")
      (vl-registry-write key " 23.ScaleDrawingUnits" "20.00000000")
      (vl-registry-write key " 23.ScaleName" "1:20")
      (vl-registry-write key " 23.ScalePaperUnits" "1.00000000")
      (vl-registry-write key " 23.ScaleType" "4")
      (vl-registry-write key " 24.ScaleDrawingUnits" "30.00000000")
      (vl-registry-write key " 24.ScaleName" "1:30")
      (vl-registry-write key " 24.ScalePaperUnits" "1.00000000")
      (vl-registry-write key " 24.ScaleType" "4")
      (vl-registry-write key " 25.ScaleDrawingUnits" "40.00000000")
      (vl-registry-write key " 25.ScaleName" "1:40")
      (vl-registry-write key " 25.ScalePaperUnits" "1.00000000")
      (vl-registry-write key " 25.ScaleType" "4")
      (vl-registry-write key " 26.ScaleDrawingUnits" "50.00000000")
      (vl-registry-write key " 26.ScaleName" "1:50")
      (vl-registry-write key " 26.ScalePaperUnits" "1.00000000")
      (vl-registry-write key " 26.ScaleType" "4")
      (vl-registry-write key " 27.ScaleDrawingUnits" "100.00000000")
      (vl-registry-write key " 27.ScaleName" "1:100")
      (vl-registry-write key " 27.ScalePaperUnits" "1.00000000")
      (vl-registry-write key " 27.ScaleType" "4")
      (vl-registry-write key " 28.ScaleDrawingUnits" "1.00000000")
      (vl-registry-write key " 28.ScaleName" "2:1")
      (vl-registry-write key " 28.ScalePaperUnits" "2.00000000")
      (vl-registry-write key " 28.ScaleType" "4")
      (vl-registry-write key " 29.ScaleDrawingUnits" "1.00000000")
      (vl-registry-write key " 29.ScaleName" "4:1")
      (vl-registry-write key " 29.ScalePaperUnits" "4.00000000")
      (vl-registry-write key " 29.ScaleType" "4")
      (vl-registry-write key " 30.ScaleDrawingUnits" "1.00000000")
      (vl-registry-write key " 30.ScaleName" "8:1")
      (vl-registry-write key " 30.ScalePaperUnits" "8.00000000")
      (vl-registry-write key " 30.ScaleType" "4")
      (vl-registry-write key " 31.ScaleDrawingUnits" "1.00000000")
      (vl-registry-write key " 31.ScaleName" "10:1")
      (vl-registry-write key " 31.ScalePaperUnits" "10.00000000")
      (vl-registry-write key " 31.ScaleType" "4")
      (vl-registry-write key " 32.ScaleDrawingUnits" "1.00000000")
      (vl-registry-write key " 32.ScaleName" "100:")
      (vl-registry-write key " 32.ScalePaperUnits" "100.00000000")
      (vl-registry-write key " 32.ScaleType" "4")
    )
    (PersonalMtextSymbols)
    (princ)
    Tom Beauford P.S.M. - Civil 2019 on Windows 10 Enterprise
    Design Analysis - Leon County Public Works/Engineering Wrap [CODE] tags around selected text
    2280 Miccosukee Rd. Tallahassee, FL 32308-5310
    Ph# (850)606-1516 Home Page

  5. #5
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL
    Posts
    3,199
    Login to Give a bone
    0

    Default Re: Set a custom Scale List via the registry

    Quote Originally Posted by cadman1957 View Post
    Thanks for the reply...that simply resets everything back to default, and not the reg values...
    Wasn't the [Default Scale List…] from the User Preferences tab in Options what you modified? To put [Default Scale List…] in a drawing or template that's the only way I know.
    Tom Beauford P.S.M. - Civil 2019 on Windows 10 Enterprise
    Design Analysis - Leon County Public Works/Engineering Wrap [CODE] tags around selected text
    2280 Miccosukee Rd. Tallahassee, FL 32308-5310
    Ph# (850)606-1516 Home Page

  6. #6
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL
    Posts
    3,199
    Login to Give a bone
    0

    Default Re: Set a custom Scale List via the registry

    Quote Originally Posted by cadman1957 View Post
    Good morning,

    I'm attempting to utilize a custom scale list that I've created for use throughout our company. We have a deployment script that will accomplish this by overwriting everyone's registry bat file, but I first wanted to test it on one pc to ensure it's what I want. I first edited my C3D 2018 scale list in "HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R22.0\ACAD-1000:409\Scale List" . Our IT guru then exported that out and merged it with the scale list in the C3D 2018 registry on his pc so we could examine it. However, when he subsequently opened his C3D (we were did this in both C3D 2017 and 2018 ), his scale list was unaffected. For this reason, I feel we must be missing a step somewhere. Anyone have any thoughts?

    Thanks, Tom
    Enter at command line to see the key:
    Code:
    (strcat "HKEY_CURRENT_USER\\" (vlax-user-product-key) "\\Scale List")
    to make sure you're using the correct key for each version.
    For 2019 it returns: "HKEY_CURRENT_USER\\Software\\Autodesk\\AutoCAD\\R23.0\\ACAD-2000:409\\Scale List"
    For 2018 it returns: "HKEY_CURRENT_USER\\Software\\Autodesk\\AutoCAD\\R22.0\\ACAD-1000:409\\Scale List"
    Tom Beauford P.S.M. - Civil 2019 on Windows 10 Enterprise
    Design Analysis - Leon County Public Works/Engineering Wrap [CODE] tags around selected text
    2280 Miccosukee Rd. Tallahassee, FL 32308-5310
    Ph# (850)606-1516 Home Page

  7. #7
    Member
    Join Date
    2015-10
    Posts
    21
    Login to Give a bone
    0

    Default Re: Set a custom Scale List via the registry

    It seems to me that C3D simply isn't looking at the scale list in the registry at all - and yes, I have a scale type of "3" in the first listed scale, to allow the list to be read. Whenever I reset the scale list in cad, it loads architectural scales when I choose to reset imperial scales, and 1:XX scales when I reset to metric scales. In my mind it's ignoring the registry scale list completely...

  8. #8
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL
    Posts
    3,199
    Login to Give a bone
    0

    Default Re: Set a custom Scale List via the registry

    Quote Originally Posted by cadman1957 View Post
    It seems to me that C3D simply isn't looking at the scale list in the registry at all - and yes, I have a scale type of "3" in the first listed scale, to allow the list to be read. Whenever I reset the scale list in cad, it loads architectural scales when I choose to reset imperial scales, and 1:XX scales when I reset to metric scales. In my mind it's ignoring the registry scale list completely...
    For 2018 version in REGEDIT HKEY_USERS\…\Software\Autodesk\AutoCAD\R22.0\ACAD-1000:409\Scale List are the Scale Names and Types what you were looking for?
    I've attached a clip of mine to compare.
    Attached Images Attached Images
    Tom Beauford P.S.M. - Civil 2019 on Windows 10 Enterprise
    Design Analysis - Leon County Public Works/Engineering Wrap [CODE] tags around selected text
    2280 Miccosukee Rd. Tallahassee, FL 32308-5310
    Ph# (850)606-1516 Home Page

  9. #9
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL
    Posts
    3,199
    Login to Give a bone
    0

    Default Re: Set a custom Scale List via the registry

    I believe the 3 & 5 ScaleTypes are for Paper Space. I simply copied everything that was in there and modified it to suit my needs. The Metric section starts with:
    Attached Images Attached Images
    Tom Beauford P.S.M. - Civil 2019 on Windows 10 Enterprise
    Design Analysis - Leon County Public Works/Engineering Wrap [CODE] tags around selected text
    2280 Miccosukee Rd. Tallahassee, FL 32308-5310
    Ph# (850)606-1516 Home Page

  10. #10
    Member
    Join Date
    2006-11
    Posts
    7
    Login to Give a bone
    1

    Default Re: Set a custom Scale List via the registry

    I confirmed in 2019 if you update the registry properly and then for each drawing plus your template you must use the Reset button in the Edit Drawing Scales dialog then you should get updated scales.

    I tested with metric scales using the following routine.

    Code:
    (defun defaultscalelist ( / rkey n ns scalelist scale scalename scaledrawingunits scalepaperunits scaletype )
    
      (vl-load-com)
    
      (setq rkey (strcat "HKEY_CURRENT_USER\\" (vlax-product-key) "\\Scale List"))
      (setq n -1)
    
      (vl-registry-delete rkey)
      
      ;; there must be a scale called "1:1" with scale of 1=1, if not AutoCAD will create a 1:1_1
      ;; in other words 1:1 is not customizable and is equivalent to 1:1,000 when units are meters and plotting in mm
      ;; this scale is read-only, ScaleType=5
      
      ;; add another scale "1:1 (1mm = 1mm)" to achieve 1 paper space unit = 0.001 model space unit (1mm = 1mm) true 1:1
    
      ;; scaletype of 3 is imperial so we have one scale of this type, the mandatory 1:1
      ;; for some reason AutoCAD thinks 1:1,000 is both imperial and metric, possibly because of the 1=1
    
      ;; all other scales are custom metric scales, scaletype = 4 is assumed
      ;; if paper units are not specified is assumed to be 1.00000000
      
      (setq scalelist (list
    
        (list "1:1 (Imperial)" (list "1.00000000" "1.00000000") "3")     ;; do not remove this
        (list "1:1" "1.00000000" "5")                                    ;; do not remove this
        (list "1:50,000" "50.00000000")
        (list "1:20,000" "20.00000000")
        (list "1:10,000" "10.00000000")
        (list "1:5000" "5.00000000")
        (list "1:2500" "2.50000000")
        (list "1:2000" "2.00000000")
        (list "1:1500" "1.50000000")
        (list "1:1250" "1.25000000")
        (list "1:1000" "1.00000000")
        (list "1:750" "0.75000000")
        (list "1:500" "0.50000000")
        (list "1:250" "0.25000000")
        (list "1:200" "0.20000000")
        (list "1:150" "0.15000000")
        (list "1:100" "0.10000000")
        (list "1:75" "0.07500000")
        (list "1:50" "0.05000000")
        (list "1mm = 1mm" "0.00100000")
    
      )) 
      
      (foreach scale scalelist (progn
        (setq n (1+ n) ns (itoa n))
        (if (< n 10) (setq ns (strcat " " ns)))
        (setq scalename (car scale) scale (cdr scale))
        (setq scaledrawingunits (car scale) scale (cdr scale))
        (if (listp scaledrawingunits)
          (setq scalepaperunits (car scaledrawingunits) scaledrawingunits (cadr scaledrawingunits))
          (setq scalepaperunits "1.00000000"))
        (setq scaletype (car scale))
        (if (= scaletype nil) (setq scaletype "4"))
        (vl-registry-write rkey (strcat ns "." "ScaleName") scalename)
        (vl-registry-write rkey (strcat ns "." "ScalePaperUnits") scalepaperunits)
        (vl-registry-write rkey (strcat ns "." "ScaleDrawingUnits") scaledrawingunits)
        (vl-registry-write rkey (strcat ns "." "ScaleType") scaletype)
      ))
    
      ;; The default AutoCAD scale list has been reset to the new default
      ;; To update the scale list for the current drawing ...
      ;;   Use the SCALELISTEDIT command
      ;;   Hit the Reset button, select Metric scales
      ;;   Rearrange any scales that are out of position
      ;;   Note that 1:1 is not adjustable and is the same as 1:1000
      ;;   For a true 1:1 use the '1mm = 1mm' scale
    
      (princ))
    
    (princ)

Similar Threads

  1. Get the default scale list out of the registry
    By Wish List System in forum AutoCAD Wish List
    Replies: 5
    Last Post: 2018-02-26, 07:40 PM
  2. Get current drawing scale, then insert block via that scale
    By U.Rackharrow in forum VBA/COM Interop
    Replies: 10
    Last Post: 2016-12-09, 03:18 PM
  3. Set administrative value of a key in the registry?
    By rajat_bapi_mallick in forum AutoLISP
    Replies: 1
    Last Post: 2007-05-12, 06:59 PM
  4. Setting a registry key in AutoCAD LT via a toolbar button
    By johan d in forum AutoCAD LT - General
    Replies: 1
    Last Post: 2006-05-24, 02:05 PM
  5. Text Size set via Scale
    By tomdillenbeck in forum ACA Wish List
    Replies: 0
    Last Post: 2005-05-09, 12:25 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •