TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Pukenzz on June 10, 2016, 11:31:36 AM
-
My dimension styles by default are set with the DIMTMOVE system variable set to 0. From time to time I want to change a dimension that is already snapped so it fits and displays a little neater and make it go to DIMTMOVE = 2. I'm having trouble making this work. Can anybody help?
Thanks in advance!
-
here is one way
(defun c:dimTextfit ( / ss1)
(princ "\nSelect Dimensions to fit text: ")
(setq ss1 (ssget ":L" '((0 . "*dim*"))))
(if ss1
(progn
;; set dimension variable override
(command "dim1" "dimtmove" "2")
;; update dimensions to override
(command "dim1" "update" ss1 "")
;; reset dimension variable
(command "dim1" "dimtmove" "0")
) ;_progn
(princ "\nNo dimensions selected")
) ;_if
(princ)
)