Insert All Blocks In A Grid

Insert All Blocks In A Grid

Anonymous
Not applicable
3,948 Views
20 Replies
Message 1 of 21

Insert All Blocks In A Grid

Anonymous
Not applicable

C3D 2020.

 

I have a drawing with hundreds of blocks in it. Does anyone know of a way, or a lsp routine, that will insert all of the blocks separated by space between them?

 

thanks

0 Likes
Accepted solutions (2)
3,949 Views
20 Replies
Replies (20)
Message 2 of 21

pendean
Community Legend
Community Legend
what spacing is needed? Or what grid sizing?
and in what order are the blocks to be inserted?
And which blocks starts where?

0 Likes
Message 3 of 21

Anonymous
Not applicable

what spacing is needed? Enough space in between blocks so that they do not overlap, but not a lot more.

 

Or what grid sizing? Ditto. If they all came in a row and I had to move blocks to make into a grid, that would still be a lot easier than inserting one by one. Otherwise just enough room plus a little to avoid overlap.


and in what order are the blocks to be inserted? Alphabetical


And which blocks starts where? Pick a point or 0,0. It doesn't matter. The idea is to have a dwg with all the blocks in it, visible, as they are defined. An added bonus would be to have the name appear below the block.

0 Likes
Message 4 of 21

Kent1Cooper
Consultant
Consultant
Accepted solution

@Anonymous wrote:

.... I have a drawing with hundreds of blocks in it. Does anyone know of a way, or a lsp routine, that will insert all of the blocks separated by space between them? ....


I have one that Inserts all drawings  in a given folder  that way -- BlockChart.lsp, available >here<.  It could be modified pretty easily to do all Blocks in the current drawing in the same way, if that seems like it would work for you.

Kent Cooper, AIA
0 Likes
Message 5 of 21

Anonymous
Not applicable

thanks @Kent1Cooper ! I will give it a shot. I was able to extract all the blocks to separate dwg's. I don't know how they will come back in, i.e. annotative and dynamic properties, but I am about to find out.

0 Likes
Message 6 of 21

Anonymous
Not applicable

I am ignorant to how this works. well, your routine worked great! the blocks did, in fact, retain annotative and dynamic characteristics that they were defined with. what i don't get is that if i open up an individual block drawing it's just the drawing objects that make up the block. i have no idea how/why those block characteristics were retained, but it is time to move forward. thank you for the assist!

0 Likes
Message 7 of 21

DaveSimmons71
Contributor
Contributor

@Kent1Cooper 

I know this is an old old thread, but I would be interested in your BlockChart.lsp modified to insert ALL blocks in the same drawing.  I have a drawing with about 640 blocks which I need to review.  Is there a way to have the block name placed as well?

 

BlockChart.lsp,  It could be modified pretty easily to do all Blocks in the current drawing in the same way, if that seems like it would work for you.

Message 8 of 21

Kent1Cooper
Consultant
Consultant
Accepted solution

@DaveSimmons71 wrote:

.... I would be interested in your BlockChart.lsp modified to insert ALL blocks in the same drawing.  ....  Is there a way to have the block name placed as well? ....


Try the attached [lightly tested] BlockChartInternal.lsp with its BCI command, for the charting part.  [The "Internal" is about Blocks within the current drawing, as opposed to the original that does drawing files from a folder.]  Not labeled [yet] -- maybe later.

Kent Cooper, AIA
Message 9 of 21

DaveSimmons71
Contributor
Contributor

 

Thank you very much for.  It worked great

Message 10 of 21

DaveSimmons71
Contributor
Contributor

@Kent1Cooper ... Anyway you could add the name of block in TEXT for me?... that would be fantastic.

0 Likes
Message 11 of 21

Kent1Cooper
Consultant
Consultant

@DaveSimmons71 wrote:

... could add the name of block in TEXT for me?... that would be fantastic.


And it would require some criteria.  On a particular Layer, or just the current one?  In a particular Style, or just the current one?  At a particular height, or just the current one, or proportional to the size of each Block, or proportional to the size of the first one Inserted, or would the Style criterion always be one with a fixed height?  Positioned where in relation to the Block?  Always at zero rotation?  etc.

Kent Cooper, AIA
0 Likes
Message 12 of 21

DaveSimmons71
Contributor
Contributor

 

I had not given all that detail much thought... Just basic standard OOTB defaults.

Layer = 0

Style = Standard

Height =. 125

Position = -.25Y and I will adjust as necessary

Rotation= zero rotation (horizontal)

 

Just used a utility to see block shape and name for reference, not a production drawing.

 

Thank you very much,

Merry Christmas & Happy New Year

 

 

0 Likes
Message 13 of 21

Kent1Cooper
Consultant
Consultant

Try the attached.  I added L to the end of the command name, for "Block Chart Internal, Labeled."  Minimally tested.

Kent Cooper, AIA
Message 14 of 21

MaccyDee
Enthusiast
Enthusiast

does this lisp still exist? link is broken and cant find it through google searches

0 Likes
Message 15 of 21

DaveSimmons71
Contributor
Contributor

Here is the one I had...

0 Likes
Message 16 of 21

cadffm
Consultant
Consultant

Hi,

BlockChartInternational.. link is not broken and works.

Try another browser !?

Sebastian

0 Likes
Message 17 of 21

cadffm
Consultant
Consultant
0 Likes
Message 18 of 21

MaccyDee
Enthusiast
Enthusiast

I did it just kept going to the Autodesk forum main page, like it was trying to link to a post that didn't exist...probably Sophos stopping me from doing absolutely anything again 😑

0 Likes
Message 19 of 21

Kent1Cooper
Consultant
Consultant

If you mean the one called BlockChart.lsp from Message 4 [I think -- the new setup doesn't have Message numbers, despite many complaints], yes, a lot of in-the-Forums links seem to have that problem lately.  I attach the file.  Write back if that's not the one you're after.

Kent Cooper, AIA
0 Likes
Message 20 of 21

MaccyDee
Enthusiast
Enthusiast

That's the one, thankyou my man 🙏

0 Likes