stenna Posted June 20, 2013 Posted June 20, 2013 Morning Everyone, I've just won a fabulous project with a very well known supermarket producing phasing drawings for their new store fit-outs; I receive their drawings in DWG format with as you can imagine thousands of blocks detailing the shop fixtures. Each blocks contact a minimum of 5 attributes that they use for merchandising etc. This information is of no use to me what so ever and I would like to delete the information from the block as it messes up my phasing drawings making them illegible . Is there a lisp or any code that could remove all the attribute entry information (nothing else without resetting the block as they are mostly dynamic blocks) so I dont have to select each and every block to delete the information. I have tried freezing the attribute layer out of the drawing but this doesn't work due to not all the attributes being setup on the same layering standard . Look forward to hearing from you all Stenna Quote
dbroada Posted June 20, 2013 Posted June 20, 2013 NOTE, you don't have to modify every block to delete the information, only one of each block type. I am sure somebody will come along with a LISP but obviously there are many ways to achieve what you want. After you have frozen the attribute layer how many different block types are still left displaying the information you don't want? If its only a few you could hand modify them to correct the layering information using BEDIT & ATTSYNC. Of course this is also readilly achievable using LISP. Quote
Organic Posted June 20, 2013 Posted June 20, 2013 Don't remove the attributes! Someone might be very unhappy with that. Quote
dbroada Posted June 20, 2013 Posted June 20, 2013 Don't remove the attributes! Someone might be very unhappy with that. If you intend to clear the information rather than the attribute then ignore my note above about only modifying one of each type. Personally I think if the contents are being deleted you may as well remove the attributes. Its no harder adding the attributes from a master file than it is to reinput lots of information. Quote
stenna Posted June 20, 2013 Author Posted June 20, 2013 Many thanks for your comments. You're right dont delete hiding is far more preferable Organic that works a treat (I think at the moment) Will it affect attributes in my drawing border....haven't tried that one Quote
dbroada Posted June 20, 2013 Posted June 20, 2013 what are you trying? I can't see any suggestion from Organic. Quote
Organic Posted June 20, 2013 Posted June 20, 2013 what are you trying? I can't see any suggestion from Organic. Attdisp it was. I removed it afterwards as I thought it wouldn't work. Quote
stenna Posted June 20, 2013 Author Posted June 20, 2013 I tried ATTDISP turning the setting to OFF. However that turns off all attributes and I ended up clearing the title block Quote
dbroada Posted June 20, 2013 Posted June 20, 2013 ok this is where editing posts can get confusing. Quote
Lee Mac Posted June 20, 2013 Posted June 20, 2013 Here is a simple program: (defun c:attclear ( / i l s ) (setq l (mapcar 'strcase '[highlight]("TAG1" "TAG2")[/highlight])) ;; Tags to clear (if (setq s (ssget "_X" '((0 . "INSERT") (66 . 1)))) (repeat (setq i (sslength s)) (foreach a (vlax-invoke (vlax-ename->vla-object (ssname s (setq i (1- i)))) 'getattributes) (if (member (strcase (vla-get-tagstring a)) l) (vla-put-textstring a "") ) ) ) ) (princ) ) (vl-load-com) (princ) Change the list of attribute tags to suit. Quote
neophoible Posted June 20, 2013 Posted June 20, 2013 Did you ask the customer how they handle this? If you shouldn't remove the attributes, and I would also think that a bad idea, then you probably shouldn't remove the information they contain, at least not permanently. If the customer doesn't have a way, then perhaps you can redefine the blocks to have hidden attributes with another method of restoring them to their original condition? I'm thinking a LISP approach would be involved both ways. Quote
stenna Posted June 20, 2013 Author Posted June 20, 2013 Lee, That's perfect many thanks Neophoible, As far as loosing the intelligence of the blocks I'm not concerned about it, the drawings I'm producing are for the building contractor not the merchandisers/store. But thanks for your comment Quote
neophoible Posted June 20, 2013 Posted June 20, 2013 You're welcome, of course. Glad to know you won't be losing anyone's important data. Congrats on landing the project. Also, welcome to the forum. 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.