Jump to content

stenna

Recommended Posts

Morning Everyone,

I've just won a fabulous project with a very well known supermarket producing phasing drawings for their new store fit-outs;:D

 

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 :x.

 

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 :ouch:.

Look forward to hearing from you all ;)

Stenna

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Don't remove the attributes! Someone might be very unhappy with that.
:thumbsup: 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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

I tried ATTDISP turning the setting to OFF.

However that turns off all attributes and I ended up clearing the title block

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Lee,

That's perfect many thanks :D

 

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

Link to comment
Share on other sites

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.:)

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...