Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

QDim aligned

Anonymous

QDim aligned

Anonymous
Not applicable

Hello forums,
   I am attempting to figure out if it is possible to change the QDim command from linear to aligned. My overall goal is to be able to quickly do dimensions of the center of circles with DIMALI either in a LISP or series of commands. I attached a picture of what I hope is possible to automate. Any help would be appreciated! Thanks in advanced.

0 Likes
Reply
Accepted solutions (1)
2,055 Views
1 Reply
Reply (1)

ВeekeeCZ
Consultant
Consultant
Accepted solution

Try this code. Not sure how it should be dimesioned if more than 3 circles are selected.

 

(defun c:DimCircle ( / lst ss i)

  (princ "\nSelect CIRCLES, more than one: ")
  (if (and (setq ss (ssget '((0 . "CIRCLE"))))
	   (or (> (sslength ss) 1)
	       (prompt "\nError: More than one circle required."))
	   )
    (progn
      (repeat (setq i (sslength ss))
	(setq lst (cons (cdr (assoc 10 (entget (ssname ss (setq i (1- i)))))) lst)))
      (if (> (length lst) 2) (setq lst (cons (last lst) lst)))
      (repeat (setq i (1- (length lst)))
	(command "_.DIMALIGNED" "_none" (nth i lst) "_none" (nth (setq i (1- i)) lst) "_none" (nth i lst)))))
  (princ)
)