Block Attribute Modification Lisp

dhaugheeWY68S
Contributor

Block Attribute Modification Lisp

dhaugheeWY68S
Contributor
Contributor

Hello

 

I am working in a drawing that utilizes a dynamic block to show locations and information of all receptacles on a floor.  Normally, these receptacles have attributes with a background mask built in to prevent any background information from obscuring the attribute information.  However, for some reason when I placed this block in the background mask somehow was initially turned off.

 

Unfortunately, I did not notice this until placing and orienting over 150 instances of this block.  Many of these have had the position of several attributes moved to better suite the drawing, but in doing so there is no clean way to edit the block without resetting each instance, which would ruin the orientation and positioning of several attributes associated.

 

Is there a lisp that would allow someone to edit a block, but instead of the ATTSYNC command that would reset everything, it would reset the attribute to have a background mask without changing anything else?

 

Thank you

0 Likes
Reply
511 Views
5 Replies
Replies (5)

Moshe-A
Mentor
Mentor

@dhaugheeWY68S  hi,

 

We are talking about a WIPEOUT inside that block - yes?

 

it's not turn off but the block went under in terms of DRAWORDER. so i suggest invoke draworder, select these blocks and brings them above. avoid using ATTSYNC.

 

does that solve your problem?

 

Moshe

 

 

 

 

0 Likes

Kent1Cooper
Consultant
Consultant

@Moshe-A wrote:

We are talking about a WIPEOUT inside that block - yes?

....


Not necessarily.  A Multi-line Attribute can have background masking added just like regular Mtext.  That would be better than using a Wipeout, since it would move with the Attribute if you reposition it.  @dhaugheeWY68S, can you clarify?

Kent Cooper, AIA
0 Likes

dhaugheeWY68S
Contributor
Contributor

Hey @Moshe-A and @Kent1Cooper 

 

Given the varying nature of the length of the text, I employed a multi-leader attribute that normally has a background mask instead of a wipeout.  For some reason, when I imported the block reference to this particular drawing, the background mask decided to just turn off.  I have checked draw order and the receptacles have no masking after adjustment.

 

Given this wasn't seen until so late in the game, it cannot really be adjusted using normal block editing without causing more problems than it fixes.  Is there a means to update a block other than ATTSYNC?

0 Likes

Kent1Cooper
Consultant
Consultant

There should be a way to step into the Block insertion and (entnext) until you get to the appropriate Attribute [identified by its DXF-code 2 entry for the Tag], and "turn on" background masking via the DXF-code 90 entry in its entity data.  (90 . 3) to use the drawing background color, or (90 . 1) with some other DXF codes involved depending on the kind of background color.  See >this<.

Kent Cooper, AIA
0 Likes

dhaugheeWY68S
Contributor
Contributor
One of these attributes reflects circuit number, which varies greatly throughout the drawing. Is there a way to input this without rewriting all of them to the same value? Or would it have to be done on a one-by-one level?

To be honest, the dxf code is a level of depth I am not terribly familiar with regarding AutoCAD.
0 Likes