Jump to content

quickly change blocks to annotative


chrisdarmanin

Recommended Posts

I have 100's of blocks that I need to change to annotative. is there a way to do it quickly or a lisp routine, rather than editing every single block and changing the setting to annotative from the properties palette?

Link to comment
Share on other sites

thanks, not the quickest but managed since I had many blocks I used data extraction to get the name of all the blocks, export to CSV, then import to Word, to further clean the formatting with find and replace (to get rid of the extra tabs and commas). I noticed word changes straight inverted commas to curly inverted commas so I did the same process again in notepad++. then i added the (foreach blk '("myblock1" "myblock2" "myblock3") (annotativeblock blk)) and pasted into AutoCAD and voila!! thanks again :) might there be a quicker method?? :D :D

Link to comment
Share on other sites

  • 2 weeks later...

Try this .. it will make all blocks in a drawing annotative.

;; Lee's code
;; https://goo.gl/KT3Ja1
(defun annotativeblock (blk)
 (and (setq blk (tblobjname "block" blk))
      (progn (regapp "AcadAnnotative")
      (entmod (append (entget (cdr (assoc 330 (entget blk))))
		      '((-3
			 ("AcadAnnotative"
			  (1000 . "AnnotativeData")
			  (1002 . "{")
			  (1070 . 1)
			  (1070 . 1)
			  (1002 . "}")
			 )
			)
		       )
	      )
      )
      )
 )
)
(defun _allannotative (/ d)
 (while (setq d (tblnext "block" (null d)))
   (and (not (assoc 1 d)) (annotativeblock (cdr (assoc 2 d))))
 )
)
(_allannotative)

Edited by ronjonp
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...