Set all dimstyles to non annotative with autolisp

Set all dimstyles to non annotative with autolisp

DC-MWA
Collaborator Collaborator
1,237 Views
1 Reply
Message 1 of 2

Set all dimstyles to non annotative with autolisp

DC-MWA
Collaborator
Collaborator

I'm looking to set all dimstyles in drawing non annotative using autolisp. Possibly in my acaddoc.lsp.

I'm not much of a programmer, so this is out of my league.

0 Likes
Accepted solutions (1)
1,238 Views
1 Reply
Reply (1)
Message 2 of 2

Moshe-A
Mentor
Mentor
Accepted solution

hi,

 

hope it is still relevent.

 

the command first disable  all annotative from any dimension style

than let you to select an annotative dimensions to remove their annotation

if you do not want that? just press enter to skip

 

enjoy

moshe

 

; diable Annotative Dimension Styles
(defun c:DADS (/ tbl ss)
 (setvar "cmdecho" 0)
 (command "._undo" "_begin")

 (while (setq tbl (tblnext "dimstyle" (not tbl)))
  (command "._dimstyle" "_ANnotative" "_No" (cdr (assoc '2 tbl)) "_Yes" "" (cdr (assoc '2 tbl)))
 )

 (if (setq ss (ssget (list '(0 . "dimension"))))
  (command "._chprop" "_si" ss "_Annotative" "_No" "")
 )
   
 (command "._undo" "_end")
 (setvar "cmdecho" 1)

 (princ)
)

0 Likes