TheSwamp

CAD Forums => CAD General => Topic started by: alanjt on April 10, 2014, 04:02:09 PM

Title: ScaleListEdit wackyness
Post by: alanjt on April 10, 2014, 04:02:09 PM
Since 2008, I've had the following in my startup file
Code: [Select]
(command "_.-scalelistedit" "_r" "_y" "_e")and it has always reset my drawing to display a set of scales in the format of 1" = XX', which is all I need/want. However, in 2013, resetting my scales leaves me with a bunch of architectural scales (eg. 3" = 1'-0"). Any thoughts for why this is happening?

The really strange part is, if I don't run the reset on startup, sometimes the scales look as I want them, and sometimes they are the architectural list.
Title: Re: ScaleListEdit wackyness
Post by: BlackBox on April 10, 2014, 04:36:05 PM
Using Civil 3D 2014 here, manually resetting of the imperial scales yields this format: 3/16" = 1'-0", resetting the metric scales yields this format: 1:10... However, resetting both metric and imperial yield some scales in this format: 1" = 50'  :-o

Title: Re: ScaleListEdit wackyness
Post by: Jeff_M on April 10, 2014, 04:36:27 PM
Not much help, but I've had this problem in C3D since C3D2012. I've seen numerous posts on the Adesk forums where it seems others are using this without issue, but no matter what I've tried I get nothing but architectural scales. I finally gave up.
Title: Re: ScaleListEdit wackyness
Post by: BlackBox on April 10, 2014, 05:23:51 PM
Not much help, but I've had this problem in C3D since C3D2012. I've seen numerous posts on the Adesk forums where it seems others are using this without issue, but no matter what I've tried I get nothing but architectural scales. I finally gave up.

I just Steal (http://www.lee-mac.com/steal.html) in this case [the scales] I want, when I need them.  :-)
Title: Re: ScaleListEdit wackyness
Post by: mjfarrell on April 10, 2014, 05:28:30 PM
Since 2008, I've had the following in my startup file
Code: [Select]
(command "_.-scalelistedit" "_r" "_y" "_e")and it has always reset my drawing to display a set of scales in the format of 1" = XX', which is all I need/want. However, in 2013, resetting my scales leaves me with a bunch of architectural scales (eg. 3" = 1'-0"). Any thoughts for why this is happening?

The really strange part is, if I don't run the reset on startup, sometimes the scales look as I want them, and sometimes they are the architectural list.

You started with ARCH DWT?
Title: Re: ScaleListEdit wackyness
Post by: Jeff H on April 10, 2014, 09:11:23 PM
I created a reg file to set them.

The scales list for reset are stored in registry and moved to different location from 2012 to 2013 if I remember correctly
Title: Re: ScaleListEdit wackyness
Post by: Jeff H on April 10, 2014, 09:17:15 PM
Found it

Code: [Select]
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R19.0\ACAD-B001:409\Scale List]
" 0.ScaleName"="1:1"
" 0.ScalePaperUnits"="1.00000000"
" 0.ScaleDrawingUnits"="1.00000000"
" 0.ScaleType"="3"
" 1.ScaleName"="1'-0\" = 1'-0\""
" 1.ScalePaperUnits"="12.00000000"
" 1.ScaleDrawingUnits"="12.00000000"
" 1.ScaleType"="2"
" 2.ScaleName"="1/128\" = 1'-0\""
" 2.ScalePaperUnits"="0.00781250"
" 2.ScaleDrawingUnits"="12.00000000"
" 2.ScaleType"="2"
" 3.ScaleName"="1/64\" = 1'-0\""
" 3.ScalePaperUnits"="0.01562500"
" 3.ScaleDrawingUnits"="12.00000000"
" 3.ScaleType"="2"
" 4.ScaleName"="1/32\" = 1'-0\""
" 4.ScalePaperUnits"="0.03125000"
" 4.ScaleDrawingUnits"="12.00000000"
" 4.ScaleType"="2"
" 5.ScaleName"="1/16\" = 1'-0\""
" 5.ScalePaperUnits"="0.06250000"
" 5.ScaleDrawingUnits"="12.00000000"
" 5.ScaleType"="2"
" 6.ScaleName"="3/32\" = 1'-0\""
" 6.ScalePaperUnits"="0.09375000"
" 6.ScaleDrawingUnits"="12.00000000"
" 6.ScaleType"="2"
" 7.ScaleName"="1/8\" = 1'-0\""
" 7.ScalePaperUnits"="0.12500000"
" 7.ScaleDrawingUnits"="12.00000000"
" 7.ScaleType"="2"
" 8.ScaleName"="3/16\" = 1'-0\""
" 8.ScalePaperUnits"="0.18750000"
" 8.ScaleDrawingUnits"="12.00000000"
" 8.ScaleType"="2"
" 9.ScaleName"="1/4\" = 1'-0\""
" 9.ScalePaperUnits"="0.25000000"
" 9.ScaleDrawingUnits"="12.00000000"
" 9.ScaleType"="2"
"10.ScaleName"="3/8\" = 1'-0\""
"10.ScalePaperUnits"="0.37500000"
"10.ScaleDrawingUnits"="12.00000000"
"10.ScaleType"="2"
"11.ScaleName"="1/2\" = 1'-0\""
"11.ScalePaperUnits"="0.50000000"
"11.ScaleDrawingUnits"="12.00000000"
"11.ScaleType"="2"
"12.ScaleName"="3/4\" = 1'-0\""
"12.ScalePaperUnits"="0.75000000"
"12.ScaleDrawingUnits"="12.00000000"
"12.ScaleType"="2"
"13.ScaleName"="1\" = 1'-0\""
"13.ScalePaperUnits"="1.00000000"
"13.ScaleDrawingUnits"="12.00000000"
"13.ScaleType"="2"
"14.ScaleName"="1-1/2\" = 1'-0\""
"14.ScalePaperUnits"="1.50000000"
"14.ScaleDrawingUnits"="12.00000000"
"14.ScaleType"="2"
"15.ScaleName"="3\" = 1'-0\""
"15.ScalePaperUnits"="3.00000000"
"15.ScaleDrawingUnits"="12.00000000"
"15.ScaleType"="2"
"16.ScaleName"="6\" = 1'-0\""
"16.ScalePaperUnits"="6.00000000"
"16.ScaleDrawingUnits"="12.00000000"
"16.ScaleType"="2"
"17.ScaleName"="1\" = 5'-0\""
"17.ScalePaperUnits"="1.00000000"
"17.ScaleDrawingUnits"="60.00000000"
"17.ScaleType"="2"
"18.ScaleName"="1\" = 10'-0\""
"18.ScalePaperUnits"="1.00000000"
"18.ScaleDrawingUnits"="120.00000000"
"18.ScaleType"="2"
"19.ScaleName"="1\" = 20'-0\""
"19.ScalePaperUnits"="1.00000000"
"19.ScaleDrawingUnits"="240.00000000"
"19.ScaleType"="2"
"20.ScaleName"="1\" = 30'-0\""
"20.ScalePaperUnits"="1.00000000"
"20.ScaleDrawingUnits"="360.00000000"
"20.ScaleType"="2"
"21.ScaleName"="1\" = 40'-0\""
"21.ScalePaperUnits"="1.00000000"
"21.ScaleDrawingUnits"="480.00000000"
"21.ScaleType"="2"
"22.ScaleName"="1\" = 50'-0\""
"22.ScalePaperUnits"="1.00000000"
"22.ScaleDrawingUnits"="600.00000000"
"22.ScaleType"="2"
"23.ScaleName"="1\" = 60'-0\""
"23.ScalePaperUnits"="1.00000000"
"23.ScaleDrawingUnits"="720.00000000"
"23.ScaleType"="2"
"24.ScaleName"="1\" = 80'-0\""
"24.ScalePaperUnits"="1.00000000"
"24.ScaleDrawingUnits"="960.00000000"
"24.ScaleType"="2"
"25.ScaleName"="1\" = 100'-0\""
"25.ScalePaperUnits"="1.00000000"
"25.ScaleDrawingUnits"="1200.00000000"
"25.ScaleType"="2"
"26.ScaleName"="1\" = 200'-0\""
"26.ScalePaperUnits"="1.00000000"
"26.ScaleDrawingUnits"="2400.00000000"
"26.ScaleType"="2"
"27.ScaleName"="1\" = 300'-0\""
"27.ScalePaperUnits"="1.00000000"
"27.ScaleDrawingUnits"="3600.00000000"
"27.ScaleType"="2"
"28.ScaleName"="1\" = 400'-0\""
"28.ScalePaperUnits"="1.00000000"
"28.ScaleDrawingUnits"="4800.00000000"
"28.ScaleType"="2"
"29.ScaleName"="1\" = 500'-0\""
"29.ScalePaperUnits"="1.00000000"
"29.ScaleDrawingUnits"="6000.00000000"
"29.ScaleType"="2"
"30.ScaleName"="1\" = 600'-0\""
"30.ScalePaperUnits"="1.00000000"
"30.ScaleDrawingUnits"="7200.00000000"
"30.ScaleType"="2"
"31.ScaleName"="1\" = 800'-0\""
"31.ScalePaperUnits"="1.00000000"
"31.ScaleDrawingUnits"="9600.00000000"
"31.ScaleType"="2"
"32.ScaleName"="1\" = 1000'-0\""
"32.ScalePaperUnits"="1.00000000"
"32.ScaleDrawingUnits"="12000.00000000"
"32.ScaleType"="2"
"33.ScaleName"="1\" = 2000'-0\""
"33.ScalePaperUnits"="1.00000000"
"33.ScaleDrawingUnits"="24000.00000000"
"33.ScaleType"="2"
"34.ScaleName"="1\" = 3000'-0\""
"34.ScalePaperUnits"="1.00000000"
"34.ScaleDrawingUnits"="36000.00000000"
"34.ScaleType"="2"
"35.ScaleName"="1\" = 4000'-0\""
"35.ScalePaperUnits"="1.00000000"
"35.ScaleDrawingUnits"="48000.00000000"
"35.ScaleType"="2"
"36.ScaleName"="1\" = 5000'-0\""
"36.ScalePaperUnits"="1.00000000"
"36.ScaleDrawingUnits"="60000.00000000"
"36.ScaleType"="2"
"37.ScaleName"="1:1"
"37.ScalePaperUnits"="1.00000000"
"37.ScaleDrawingUnits"="1.00000000"
"37.ScaleType"="5"
"38.ScaleName"="1:2"
"38.ScalePaperUnits"="1.00000000"
"38.ScaleDrawingUnits"="2.00000000"
"38.ScaleType"="4"
"39.ScaleName"="1:4"
"39.ScalePaperUnits"="1.00000000"
"39.ScaleDrawingUnits"="4.00000000"
"39.ScaleType"="4"
"40.ScaleName"="1:5"
"40.ScalePaperUnits"="1.00000000"
"40.ScaleDrawingUnits"="5.00000000"
"40.ScaleType"="4"
"41.ScaleName"="1:8"
"41.ScalePaperUnits"="1.00000000"
"41.ScaleDrawingUnits"="8.00000000"
"41.ScaleType"="4"
"42.ScaleName"="1:10"
"42.ScalePaperUnits"="1.00000000"
"42.ScaleDrawingUnits"="10.00000000"
"42.ScaleType"="4"
"43.ScaleName"="1:16"
"43.ScalePaperUnits"="1.00000000"
"43.ScaleDrawingUnits"="16.00000000"
"43.ScaleType"="4"
"44.ScaleName"="1:20"
"44.ScalePaperUnits"="1.00000000"
"44.ScaleDrawingUnits"="20.00000000"
"44.ScaleType"="4"
"45.ScaleName"="1:30"
"45.ScalePaperUnits"="1.00000000"
"45.ScaleDrawingUnits"="30.00000000"
"45.ScaleType"="4"
"46.ScaleName"="1:40"
"46.ScalePaperUnits"="1.00000000"
"46.ScaleDrawingUnits"="40.00000000"
"46.ScaleType"="4"
"47.ScaleName"="1:50"
"47.ScalePaperUnits"="1.00000000"
"47.ScaleDrawingUnits"="50.00000000"
"47.ScaleType"="4"
"48.ScaleName"="1:100"
"48.ScalePaperUnits"="1.00000000"
"48.ScaleDrawingUnits"="100.00000000"
"48.ScaleType"="4"
"49.ScaleName"="2:1"
"49.ScalePaperUnits"="2.00000000"
"49.ScaleDrawingUnits"="1.00000000"
"49.ScaleType"="4"
"50.ScaleName"="4:1"
"50.ScalePaperUnits"="4.00000000"
"50.ScaleDrawingUnits"="1.00000000"
"50.ScaleType"="4"
"51.ScaleName"="8:1"
"51.ScalePaperUnits"="8.00000000"
"51.ScaleDrawingUnits"="1.00000000"
"51.ScaleType"="4"
"52.ScaleName"="10:1"
"52.ScalePaperUnits"="10.00000000"
"52.ScaleDrawingUnits"="1.00000000"
"52.ScaleType"="4"
"53.ScaleName"="100:1"
"53.ScalePaperUnits"="100.00000000"
"53.ScaleDrawingUnits"="1.00000000"
"53.ScaleType"="4"
Title: Re: ScaleListEdit wackyness
Post by: mjfarrell on April 10, 2014, 09:53:26 PM
cool bit of code

but isn't it  bit odd that one must resort to such brute force to get autocad to behave?
Title: Re: ScaleListEdit wackyness
Post by: MP on April 10, 2014, 09:56:05 PM
... isn't it bit odd that one must resort to such brute force to get autocad to behave?

<blink> are you new to AutoCAD? :-D
Title: Re: ScaleListEdit wackyness
Post by: alanjt on April 10, 2014, 10:13:31 PM
I created a reg file to set them.

The scales list for reset are stored in registry and moved to different location from 2012 to 2013 if I remember correctly
I cam across the registry list, and it included the correct imperial scales, and metric, but no architectural. However, reset uses arch. scales. When I get in the office tomorrow, I'll have to see if your location is the same as mine. I was hoping a registry edit wasn't the answer, but I'll take it.

Seriously, thanks for the replies, guys. :)

... isn't it bit odd that one must resort to such brute force to get autocad to behave?

<blink> are you new to AutoCAD? :-D
lol
Title: Re: ScaleListEdit wackyness
Post by: ChrisCarlson on April 11, 2014, 12:16:03 PM
Doesn't the scale list come from the template file? Why not just set the template with the correct scales?
Title: Re: ScaleListEdit wackyness
Post by: alanjt on April 11, 2014, 02:46:50 PM
So, I took a closer look at my registry, and in the scale list folder, it only shows the imperial 1" = xx' and metric 1:XX scales. I don't even have architectural scales as an option. wtf

I'm just going to have it delete unused scales, and make sure the ones needed are in there.
Title: Re: ScaleListEdit wackyness
Post by: Jeff H on April 11, 2014, 03:05:25 PM
Wait I might of got mixed up I think the registry was only required to share scales with other but for setting them was in options and different for each profile which be why it sometimes work depending on if a different profile was current when closed.

The registry was copied from what was created for default so other people could have same list without having to go through same process on each machine.

Sorry if already knew that or am more tardish with reply






Title: Re: ScaleListEdit wackyness
Post by: alanjt on April 11, 2014, 04:35:32 PM
Wait I might of got mixed up I think the registry was only required to share scales with other but for setting them was in options and different for each profile which be why it sometimes work depending on if a different profile was current when closed.

The registry was copied from what was created for default so other people could have same list without having to go through same process on each machine.

Sorry if already knew that or am more tardish with reply

That explains a lot. Thanks, Jeff.

Here's what I came up with. Anyone see any issues with it?

Code: [Select]
((lambda (/ _pad scales pad reg i n)

   (defun _pad (s l)
     (if (< (strlen s) l)
       (_pad (strcat " " s) l)
       s
     )
   )

   (setq scales '(1 5 10 20 30 40 50 60 80 100 200 300 400 500 600 1000 2000 3000 4000 5000 6000)
         pad    (strlen (itoa (length scales)))
         reg    (strcat
                  "HKEY_CURRENT_USER\\"
                  (if vlax-user-product-key
                    (vlax-user-product-key)
                    (vlax-product-key)
                  )
                  "\\Scale List"
                )
         i      -1
   )

   (vl-registry-delete reg)

   (foreach scale scales

     (setq i (1+ i)
           n (_pad (itoa i) pad)
     )

     (vl-registry-write reg (strcat n ".ScaleName") (strcat "1\" = " (itoa scale) "'"))
     (vl-registry-write reg (strcat n ".ScalePaperUnits") "1")
     (vl-registry-write reg (strcat n ".ScaleDrawingUnits") (itoa scale))
     (if (eq scale 1)
       (vl-registry-write reg (strcat n ".ScaleType") "3")
       (vl-registry-write reg (strcat n ".ScaleType") "2")
     )
   )

   (command "_.-scalelistedit" "_r" "_y" "_e")
   (princ)
 )
)
Title: Re: ScaleListEdit wackyness
Post by: alanjt on April 11, 2014, 04:41:23 PM
Currently, I'm just using the default <<C3D_Imperial>> profile, and it's as if it is set to be architectural. After editing the registry and resetting the scalelist (with above code), if I go into Options as Jeff has shown, and click "reset", it will reset all the scales back to architectural for imperial.
Title: Re: ScaleListEdit wackyness
Post by: alanjt on April 11, 2014, 04:45:21 PM
Now this is interesting:

Quote
[HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R19.0\ACAD-B000:409\Profiles\<<C3D_Imperial>>\General]
"AlternativePageSetUpsTemplate"="%LocalRootFolder%\\template\\sheetsets\\architectural imperial.dwt"

This profile is OTB.