JBullseye74 Posted July 26, 2011 Posted July 26, 2011 thought i'd share this gem with you all....... there is a command in Sketchup where you can make a block unique, now i quite often have situations where i would like this command in autocad and you have to go into block editor and save is and its a real painful slow process. So i had a quick search on the internet and trumbled across this, someone found out that if you use the flatten command on a block it gives it a sufix of -flat-1 in the block name thus making it unique. Also if you do it again on the first block it automatically renumbers it the next one -flat-2 and so on and so forth. Hope this helps yall. Quote
Pablo Ferral Posted July 27, 2011 Posted July 27, 2011 You can also copy geometry and right click 'Paste as Block' to create anonymous blocks on the fly (In your case you would need to explode the block first) Quote
SLW210 Posted July 27, 2011 Posted July 27, 2011 You can also copy geometry and right click 'Paste as Block' to create anonymous blocks on the fly (In your case you would need to explode the block first) Blocks created by "Paste as Block" are not ANONYMOUS blocks. Two completely different things. When you "Paste as Block" a block needs a name, so AutoCAD creates a random and unique name. Quote
Pablo Ferral Posted August 1, 2011 Posted August 1, 2011 You are right - I didn't read that thoroughly enough. Quote
David Bethel Posted August 1, 2011 Posted August 1, 2011 Here''s function that will convert a standard block INSERT into an anonymous block INSERT: ;;;ARG -> Standard INSERT ename ;;;RET -> T nil (defun anon (b / tdef en ed bn bd in) (and (= (type b) 'ENAME) (setq bd (entget b) in (cdr (assoc 2 bd)))) (if (or (not bd) (not in) (/= "INSERT" (cdr (assoc 0 bd))) (= "*" (substr in 1 1)) (= (logand (cdr (assoc 70 (tblsearch "BLOCK" in))) 4) 4) (= (logand (cdr (assoc 70 (tblsearch "BLOCK" in))) 16) 16) (= (logand (cdr (assoc 70 (tblsearch "BLOCK" in))) 32) 32)) (progn (princ "*** Not A Changeable Block *** ") (setq bd nil in nil b nil) (exit))) (setq tdef (tblsearch "BLOCK" in) en (cdr (assoc -2 tdef)) ed (entget en)) (entmake (list (cons 0 "BLOCK") (cons 2 "*U") (cons 70 1) (cons 10 (cdr (assoc 10 tdef))))) (entmake ed) (while (setq en (entnext en)) (setq ed (entget en)) (entmake ed)) (setq bn (entmake (list (cons 0 "ENDBLK")))) (setq bd (subst (cons 2 bn) (assoc 2 bd) bd)) (entmod bd) (entupd b)) -David Quote
Recommended Posts
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.