### Author Topic: 2008: Comparing DimScale with CAnnoScale  (Read 2155 times)

0 Members and 1 Guest are viewing this topic.

• Guest
##### 2008: Comparing DimScale with CAnnoScale
« on: July 17, 2007, 02:24:23 PM »
OK, in 2008 as you know we now have AnnoScaleing.
I'd like to update me existing DWG when they're opening to the correct AnnoScale.
Like most people on pre-2008 we used DimScale as our DWG scale, 96 = 1/8", etc...
We only work in Imperial units, so yes I know this doesn't work for Metric (ISO).
Also, I know it's not going to work for Civil scales like 1' = 20'-0"
So the question is, is there a better way of doing this?
Sure would be nice if you could set the "CANNOSCALEVALUE" instead of relying on string....

Here's what I have so far.
Code: [Select]
`(if (not (equal (/ 1 (getvar "DIMSCALE")) (getvar "CANNOSCALEVALUE")))    (setvar "CANNOSCALE" (strcat (rtos (/ 12 (getvar "DIMSCALE")) 4 8) " = 1'-0\"")))`

• Guest
##### Re: 2008: Comparing DimScale with CAnnoScale
« Reply #1 on: July 17, 2007, 02:33:11 PM »
First road block is the above code doesn't work with 1-1/2" = 1'-0" since:
(rtos (/ 12 (getvar "DIMSCALE")) 4 8 )
returns
"1 1/2\""
« Last Edit: July 17, 2007, 02:36:28 PM by BazzaCAD »

`    (if (not (equal (/ 1 (getvar "DIMSCALE")) (getvar "CANNOSCALEVALUE")))      (progn        (setvar "TILEMODE" 1);; <- can't set AnnoScale in paperspace        (setq txtscale (rtos (/ 12 (getvar "DIMSCALE")) 4 8))        (cond          ((= txtscale "1 1/2\"")            (setq txtscale "1-1/2\"")          )        ;; room for more issues...        );_ cond        (setq annoscale (strcat txtscale " = 1'-0\""))        (setvar "CANNOSCALE" annoscale)        (princ (strcat "\nYour AnnoScale has been set to: " annoscale "\n\n"))      );_ progn    );_ if`