改了一下,不知行不行。 - ;支持窗选
- (defun c:ddd (/ GetDimStyleList layout dst ss)
- (defun GetDimStyleList (/ ds lst)
- (while (setq ds (tblnext "dimstyle" (not ds)))
- (setq ds (cdr (assoc 2 ds)))
- (if (not (member ds '("_TCH_ARCH" "_TCH_ARROW")))
- (setq lst (cons ds lst))
- )
- )
- )
- (setq pt1 (getpoint "\nFirst Corner :")
- pt2 (getcorner pt1 "\nNext Corner :"))
- (setq layout (cons 410 (getvar "ctab"))
- dst (getvar "dimstyle"))
- (foreach x (GetDimStyleList)
- (if (setq ss (ssget "_W" PT1 PT2 (list '(0 . "dim*") (cons 3 x) layout))) (progn
- (command "_.dimstyle" "_r" x)
- (command "_.dim" "_update" ss "" "_exit")
- ))
- )
- (command "_.dimstyle" "_r" dst)
- (princ)
- )
|