Author Topic: Text Fit  (Read 376 times)

0 Members and 1 Guest are viewing this topic.

Pukenzz

  • Newt
  • Posts: 47
Text Fit
« 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!

danallen

  • Guest
Re: Text Fit
« Reply #1 on: June 10, 2016, 12:31:02 PM »
here is one way
Code: [Select]
(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)
)