Using Vl is probably easiest as look at 2 properties
; Linetype = "DASHED"
; LinetypeScale = 2.5
You can change both of these, you can also get the length of an object just be aware for a Circle it is "Cicumference" others "length" should work.
(setq obj (vlax-ename->vla-object (car (entsel "Pick obj"))))
(setq lt (vlax-get obj 'Linetype))
(setq sc (vlax-get obj 'LinetypeScale))
(if (= (vlax-get obj 'Objectname) "AcDbCircle")
(setq len (vlax-get obj 'Circumference))
(setq len (vlax-get obj 'Length))
; do your thing here use PUT to change value
)
if i use this to setting , must be set many cond. have else better code?
------------------------------------------------>
(cond ((and (> len 0) (<= len 2))
(setq leg 2)
)
((and (> len 2) (<= len 5))
(setq leg 2.5)
)
((and (> len 5) (<= len 50))
(setq leg 4)
)
((and (> len 50) (<= len 120))
(setq leg 15)
)
((and (> len 120) (<= len 1000))
(setq leg 20)
)
((and (> len 1000) (<= len 1500))
(setq leg 40)
)
((and (> len 1500) (<= len 2500))
(setq leg 80)
)
) ;end cond
(setq sca (/ leg scale lts 10))
(command "change" nam "" "p" "s" SCA "")
-------------------------------------------------->
lts is ltscale.
scale is setting numerical value by myself.
use repeat to change ltscale.
different linetype and linetype 2 or X2 must be use different setting.
and if the drawing had linetype ,how to know it is inch or mm?
This will also affect ltscale too.