Dinochrome Posted July 28, 2015 Share Posted July 28, 2015 I have a drawing that has a large quantity of exploded blocks – AutoCADE. I’d like to delete all of the ATTDEFs that are blank and left over on paperspace, but not visible. The drawings I’m editing are in one file, multi-tab. When I select a piece of text to edit, most of them are actually ATTDEFs and I get the dialoge box with: Tag, Prompt, and Default. I could work that way, but I want to leave the file clean when I’m done. I found a routine that converts all of the ATTDEFs to text, but when I select “ALL”, it even grabs the ones that are blank and not visible. I’d like to find a way to just delete the blanks before I run the routine. I mean, why leave them in the drawing? It’s clumsy. Is there a way to use filters for blank ATTDEFs? Here is the LISP location: http://lazydrafter.blogspot.com/2012/11/convert-exploded-attributes-to-text.html Quote Link to comment Share on other sites More sharing options...
RobDraw Posted July 28, 2015 Share Posted July 28, 2015 If purge does not delete them when the purge empty objects selection is checked, you could select all with Ctrl+A and deselect with Shift+crossing window and erase what left over. WBlock works with this also. What else have you tried? Quote Link to comment Share on other sites More sharing options...
Dinochrome Posted July 28, 2015 Author Share Posted July 28, 2015 ...hmmmn, will that affect elements on the other tabs? I'll give it a try. Quote Link to comment Share on other sites More sharing options...
Dinochrome Posted July 28, 2015 Author Share Posted July 28, 2015 I'm having a tough time. I keep getting logged out of the forum every couple minutes before I can reply. I've don -purge > reg, zero-length, and empty text. When I select "ALL" to copy the contents of a layout, it doesn't bring it to a new drawing. Quote Link to comment Share on other sites More sharing options...
Dinochrome Posted July 28, 2015 Author Share Posted July 28, 2015 I was trying to make a test file that I could upload. Quote Link to comment Share on other sites More sharing options...
nukecad Posted July 29, 2015 Share Posted July 29, 2015 I keep getting logged out of the forum every couple minutes before I can reply. Tick the 'Remember Me' box when you log in. Don't forget to then log out when you have finished your visit. Quote Link to comment Share on other sites More sharing options...
SLW210 Posted July 29, 2015 Share Posted July 29, 2015 I created a new thread in the AutoCAD Drawing Management & Output Forum > "delete all of the ATTDEFs that are blank and left over on paperspace, but not visible" for you. Quote Link to comment Share on other sites More sharing options...
Dinochrome Posted July 29, 2015 Author Share Posted July 29, 2015 I created a new thread in the AutoCAD Drawing Management & Output Forum > "delete all of the ATTDEFs that are blank and left over on paperspace, but not visible" for you. Thak you! Quote Link to comment Share on other sites More sharing options...
RobDraw Posted July 29, 2015 Share Posted July 29, 2015 So where is that file? Quote Link to comment Share on other sites More sharing options...
Dinochrome Posted July 29, 2015 Author Share Posted July 29, 2015 I'm trying to delete all but one tab. When I delete all of the other tabs, it appears that the attribute definitions on the tab I'm examining and planning on uploading are miraculously gone. I've done a recover on it, but there seems to be something fishy. It seems to clear up all of the tabs when I delete the second tab. Quote Link to comment Share on other sites More sharing options...
Dinochrome Posted July 29, 2015 Author Share Posted July 29, 2015 OK, I have it pared down to two tabs with the test.dwg Quote Link to comment Share on other sites More sharing options...
Dinochrome Posted July 29, 2015 Author Share Posted July 29, 2015 ...first tab is I think where the actual problem lies. I have it uploaded with the second tab active and ready for A2T lisp. Quote Link to comment Share on other sites More sharing options...
Dinochrome Posted July 29, 2015 Author Share Posted July 29, 2015 I tried running -purge again - nuclear option... Command: -PUrge Enter type of unused objects to purge [blocks/DEtailviewstyles/Dimstyles/Groups/LAyers/LTypes/MAterials/MUltileaderstyles/Plotstyles/SHapes/textSTyles/Mlinestyles/SEctionviewstyles/Tablestyles/Visualstyles/Regapps/Zero-length geometry/Empty text objects/All]: a Enter name(s) to purge : Verify each name to be purged? [Yes/No] : n No unreferenced blocks found. No unreferenced layers found. No unreferenced linetypes found. No unreferenced text styles found. No unreferenced shape files found. No unreferenced dimension styles found. No unreferenced mlinestyles found. No unreferenced plotstyles found. No unreferenced table styles found. No unreferenced materials found. No unreferenced visual styles found. No unreferenced multileader styles found. No unreferenced groups found. No unreferenced Detail view styles found. No unreferenced Section view styles found. Command: *Cancel* Command: A2t Select objects: all 93 found They're still there. Quote Link to comment Share on other sites More sharing options...
RobDraw Posted July 29, 2015 Share Posted July 29, 2015 It appears that file has 93 attributes and all have a value assigned. Quote Link to comment Share on other sites More sharing options...
Dinochrome Posted July 29, 2015 Author Share Posted July 29, 2015 (edited) ;;; ;;; Convert Attribute definitions to text ;;; (defun c:A2T (/ eset1 blkcnt en enlist vl space) (setq eset1 (ssget (list (cons 0 "ATTDEF"))) blkcnt 0 ) (if eset1 (while (<= blkcnt (- (sslength eset1) 1)) (setq en (ssname eset1 blkcnt) enlist (entget en) space (cdr (assoc 67 enlist)) ) (setq vl (list (cons 0 "TEXT") (cons 100 "AcDbEntity") (cons 100 "AcDbText") (assoc 7 enlist) (assoc 8 enlist) (assoc 10 enlist) (assoc 40 enlist) (cond ((assoc 62 enlist)) ((cons 62 256)) ) (cons 1 (cdr (assoc 2 enlist))) (if (= space nil) (cons 67 0) (cons 67 space) ) ) ) (entdel en) (entmake vl) (setq blkcnt (1+ blkcnt)) ) ) ) ...run this on the second tab and select "ALL" for your selection set. You can erase the visible objects with a window first...) A whole bunch appear out of nowhere. Edited July 30, 2015 by SLW210 Code Tags Quote Link to comment Share on other sites More sharing options...
Dinochrome Posted July 29, 2015 Author Share Posted July 29, 2015 I'm not a lisp programmer when I pasted it, I lost the extra indents in the routine from the original. Quote Link to comment Share on other sites More sharing options...
Dinochrome Posted July 29, 2015 Author Share Posted July 29, 2015 http://lazydrafter.blogspot.com/2012/11/convert-exploded-attributes-to-text.html ...the original.... Quote Link to comment Share on other sites More sharing options...
Dinochrome Posted July 29, 2015 Author Share Posted July 29, 2015 I did a save-as on the original, erased everything "ALL", and went tab-by-tab and copied it all from the original to th copy. Thank you for the consideration, but this is more of a exercise in why/how. I'm finished with my clumsy solution. Quote Link to comment Share on other sites More sharing options...
Dinochrome Posted July 29, 2015 Author Share Posted July 29, 2015 I selected visible elements with a window FYI, base-point 0,0 in each model for consistency. Quote Link to comment Share on other sites More sharing options...
RobDraw Posted July 29, 2015 Share Posted July 29, 2015 Okay, I didn't realize that the file was before you exploded nor that you were the one doing the exploding. I thought you were the victim. I'm glad you had the unmolested version. Are you familiar with the burst command? It's much better for exploding attributed blocks. Among a couple other things, it converts the attributes to text and leaves empty text for the blank ones which can easily be purged. With that layout, after bursting you are left with one empty block which you can easily get rid of using the Ctrl+A selection/cross window deselect method. Quote Link to comment Share on other sites More sharing options...
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.