;;;; Dimension Text Style Assign to All
;;; Created by Kent1Cooper
;;; Saved from: https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-change-textstyles-in-all-dimensions-and-leaders-in-an/td-p/7061539

(defun C:DS
(/ tblentry styname data)

(command "-style" "Igal" "arial.ttf" "" "" "0" "" "")

(while (setq tblentry (tblnext "dimstyle" (not tblentry))); step through Dim.Style entries
(setq
styname (cdr (assoc 2 tblentry)); Style name
data (entget (tblobjname "dimstyle" styname)); its entity data
); setq
(entmod
(subst
(cons 340 (tblobjname "STYLE" "Igal")); assign Text Style to it
(assoc 340 data)
data
); subst
); entmod
); while
(command "_.dimoverride" "DIMTXSTY" "Igal" "" "_all" ""); force it on already-drawn ones
(princ)
); defun
(c:ds)

Advertisements