I can't answer why, but this might help. Here is a function for converting a
scale (real) to a string:
(defun kcs_scaletos (scale)
(if (> (getvar "lunits") 3)
(if (= (fix (/ scale 10.0))(/ scale 10.0))
(if (= (fix (/ scale 12.0))(/ scale 12.0))
; Engineering [ex: 480 => 1" = 30']
(strcat "1\" = " (rtos (/ scale 12.0) 2 0) "'")
; Bogus (display as ratio)
(strcat "1 = " (rtos scale 2 0))
)
; Architectural [ex: 1/16" = 1'-0"]
(strcat (rtos (/ 12.0 scale)) " = " (rtos 12.0))
)
; Decimal [ex: 1=50]
(if (= (getvar "measurement") 1)
(strcat "1:" (rtos scale 2 0))
(strcat "1 = " (rtos scale 2 0))
)
)
)
Then you can do something like
(setvar "cannoscale" (kcs_scaletos 48))
Ken Krupa
Krupa CADD Solutions
www.krupacadd.com
KCS Productivity Pack for AEC
Autodesk Authorized Developer
wrote in message news:5550610@discussion.autodesk.com...
I have a oft-used AutoLISP macro from ADT 2007 that sets the drawing scale
via "_AECSETDWGSCALE" to a decimal value (such as 48.0 for 1/4"=1'-0" scale)
that represents the working scale selected by the user.
Now if I understand correctly, this will no longer work in ACA 2008. In the
new system, given the decimal value, I must first create a scale in the
scale list and then set the value of CANNOSCALE to the name of that scale.
is this correct?
I'm not sure I like this new system. Why must the variable "CANNOSCALE" be
limited to a list of predefined scales? Why not just set it to a decimal
value and there you go?
On a related topic, there is an option under "AECDWGSETUP" to "Automatically
Create Dimscale Override". Well, I don't recommend using dimension
overrides for mixing scales in a drawing. I think that creating separate
dimension styles is more robust. Would it be wise to have an option to
"Automatically Create New Dimension Style" when changing annotation scales?
I want to write a macro that does exactly this, if I am able.
Richard Ellison
GSSTJ Architects