I am using the below code snippet to get text heights. This code fails only when the current dimension style is "standard"
Any insight as to why?
Code:
(defun c:sth ()
(setq txttype (getstring "\n\"alt\" or [\"reg\"]"))
(cond ((/= txttype "alt") (setq txttype "reg")))
(if (= (getvar 'ctab) "Model")
(setq dimsc (getvar 'dimscale))
(setq dimsc 1)
)
(setq txtheight
(cdr
(assoc 140
(entget (tblobjname "dimstyle" (getvar 'dimstyle)))
)
)
)
(setq txtheight (* txtheight dimsc))
(cond
(
(= txttype "alt")
(setq txtheight (* txtheight 0.6))
)
)
(setvar "textsize" txtheight)
)