Block attributes burst

Block attributes burst

autoskocc
Participant Participant
769 Views
12 Replies
Message 1 of 13

Block attributes burst

autoskocc
Participant
Participant

Hello,

 

Is there a way to burst a block so the text attribute is separated from the symbol as it normally is using that command but the symbol is not being exploded. I'm using the newest version of AutoCAD. I would solve this with nested blocks but unfortunately the software I'm using with AutoCAD doesn't recognize them. I saw an AutoLISP from few years ago but I reckon it doesn't work with the latest version of AutoCAD.

 

Regards

0 Likes
770 Views
12 Replies
Replies (12)
Message 2 of 13

Kent1Cooper
Consultant
Consultant

@autoskocc wrote:

.... I saw an AutoLISP from few years ago but I reckon it doesn't work with the latest version of AutoCAD.


I would not assume that.  AutoLisp doesn't change much with new versions -- I have many routines that date back decades and still work.  Try it, and if it doesn't work, or doesn't do what you want, write back.

Kent Cooper, AIA
0 Likes
Message 3 of 13

autoskocc
Participant
Participant

Thanks Kent.

 

So I've got this topic: https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bursting-attributes-but-keep-block-s...

 

The guy in the topic says: "OK Guys, I found this lisp which is doing for me what I want of keeping the symbols as it is after bursting" - for me it doesn't work. Any ideas?

 

Regards

0 Likes
Message 4 of 13

autoskocc
Participant
Participant

Sorry For writing in two topics - still learning how this forum works... Ill keep the conversation in this one.

 

@Kent1Cooper BURST, like EXPLODE, leaves the pieces of what it broke up as the Previous selection set.  Are these Blocks that are Inserted multiple times, or only once?  If they're one-off instances, a routine could be made to take that Previous selection set after BURSTing, remove the Text element(s?) from it, and redefine the Block using the remaining pieces."

 

Lets say its a simple block. Square with 3 text attributes. I will have a batch of those to burst in that certain way: burst the text attributes but keep the structure of the square. Its a simple block, with no nested blocks in it.

 

Thanks for your help 

Regards

0 Likes
Message 5 of 13

Kent1Cooper
Consultant
Consultant

Burst2 certainly doesn't keep the rest of the Block as a Block but with the Attribute parts extracted into independent Text, as I think you want.  So I wonder what they could have meant by "keeping the symbols as it is after bursting."

 

I assume the idea suggested in my previous Message wouldn't work if there are multiple Insertions with different values assigned to the same Attributes -- I'm not sure [haven't experimented] what would happen to those Attributes [in other Insertions than the one that was Burst] once the Block is redefined without any.

Kent Cooper, AIA
0 Likes
Message 6 of 13

autoskocc
Participant
Participant

Same block will be inserted multiple times in the drawing if that's what you mean. That last lisp they have in that topic called: "burstobj9.lsp" works but it creates odd selection window on the actual symbol + it doesn't work as batch burst.

 

0 Likes
Message 7 of 13

Kent1Cooper
Consultant
Consultant

Here's what I'm now imagining a routine could likely be made to do:


Find all the Blocks of that name, and put them in a selection set.

BURST the first one in the set.

Put the Previous selection [the results from BURSTing] into another selection set.

Remove the Text elements from that.

Use what remains to redefine the Block [same name].

The remaining Insertions of the original Block will still have their Attributes, even though the Block definition now doesn't include any.  For each remaining Block in the initial selection set:
  Insert a Block by the new definition, using the same insertion point, scales and rotation, which should overlay the original except without Attributes;

  BURST the original to get its Attributes into Text objects;

  Put the Previous selection into another selection set;

  Remove the Text elements from that, and ERASE what remains.

 

Does that sound like it would do what you're after?

 

COMPLICATION:  Would any be Inserted at scales other than 1 and/or rotations other than 0°?  You would want the redefinition to be done from one at scales of 1 and rotation of 0°, so that putting new ones over old ones they would match.  If different scales/rotations are involved, instead of BURSTing the first one in the initial selection, it could Insert a new one at scales of 1 and rotation of 0°, and use that for the basis of the new definition.

Kent Cooper, AIA
0 Likes
Message 8 of 13

autoskocc
Participant
Participant

Hi Kent. 

 

First of all of the scales and rotations will be the same, that is scale= 1 and rotation of 0. And yes it sounds like something what I would like to achieve although I'm not sure about the first row: "Find all the Blocks of that name, and put them in a selection set." - does it have to be like this? Or could it be -Find all the Blocks, and put them in a selection set. ?

 

And few mentions just to make sure we are on the same page:

-blocks will have different shapes and sizes

-blocks will have text attributes that are on certain layers and I would like to keep them on those layers

-some of the blocks will be inserted just once, some of them 100 times

-some of the blocks will have 3 text attributes, other none - just an example

-all of the blocks in the drawing will have to go through this routine, that's why a batch block procedure would be best

 

Thank you for your help

Regards

0 Likes
Message 9 of 13

Kent1Cooper
Consultant
Consultant

Would you want to find all Blocks with Attributes, of any name?  Would that catch any that you don't want to BURST?

Would there be any Text elements in any Block definition(s) that are not Attributes?

Kent Cooper, AIA
0 Likes
Message 10 of 13

autoskocc
Participant
Participant

Would you want to find all Blocks with Attributes, of any name?

Exactly, all blocks with text attributes of any name.

 

 Would that catch any that you don't want to BURST?

The only ones that I don't wanna burst are the ones without text attributes but I guess that wont upset the routine?

 

Would there be any Text elements in any Block definition(s) that are not Attributes?

No.

 

 

0 Likes
Message 11 of 13

Kent1Cooper
Consultant
Consultant

I got something working when I had Blocks with all their ingredients on Layer 0, but assuming that would not always be the case, I tried to allow for other conditions, and found two problems:
1.  So that the Block is not re-defined with its pieces on the Layer of the first Block it encounters [to use as the basis for a new definition without the Attributes], I had it move that Block to Layer 0 before BURSTing.  But that meant that the extracted Text from its Attributes, at that one location only, are on Layer 0, but those from other Insertions are on the Layer their source Blocks had been Inserted on.

2.  When I tried something with Blocks having parts on different Layers, it didn't work right.  I find that BURST does not leave everything in the Previous selection when more than one Layer is involved in the Block ingredients.  I'll keep thinking about it, and see if I can get into how Burst works and compensate, but so far....

Kent Cooper, AIA
0 Likes
Message 12 of 13

autoskocc
Participant
Participant

Ok, no worries. Thanks for trying. But maybe someone have the skills to adjust the routine from this topic: https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bursting-attributes-but-keep-block-s... . Its called ""burstobj9.lsp" and its the last routine in that topic. I think it might be a good start cause the attributes are bursted, they are on good layers, block is stitched together but it has an odd frame around it. The other thing not working for this routine is batch bursting blocks. Maybe that helps?

 

Regards

0 Likes
Message 13 of 13

Kent1Cooper
Consultant
Consultant

@autoskocc wrote:

.... I think it might be a good start cause the attributes are bursted, they are on good layers, block is stitched together but it has an odd frame around it. ....


I assume [without trial] that if the "odd frame" is visible only when you pick on something within it, they're not stitched into a Block, but it's a Group surround [see how it lists things in the Properties palette].  If that's the case, it might not be difficult to have them made into Blocks rather than put into Groups, but under that approach it would need to be a different Block name for each one.  I assume you want the same Block name & definition for all of them of the same original name, just with the Attributes pulled out -- that's what I've been trying, but with success so far only when all Block parts are on Layer 0, and all Insertions are at scales = 1 and rotation = 0 [as you described in Message 8].

Kent Cooper, AIA
0 Likes