Counting total number of blocks in Drawing with Dynamic Block Array

mstamnitz
Explorer
Explorer

Counting total number of blocks in Drawing with Dynamic Block Array

mstamnitz
Explorer
Explorer

I've created a dynamic block for a stormwater device with an array that allows me to quickly fill an area with these stormwater devices. There are multiple configurations / directions, so in total there are 20 of these dynamic blocks placed, but each has a variable number of "blocks" within them (i.e. one may be 2 blocks wide x 4 deep, another may be 1 block wide x 20 deep).

 

SCELL Dynamic Block.png

 

What I need is the total number of stormwater devices. I've seen options where you can add an attribute that calculates the number of units in each block, but then I would still need to manually add the totals for each of the 20 separate blocks (could do that, but I'm trying to reduce opportunities for human error). If I select all of the blocks, properties tells me there are 20 selected because it's recognizing the overall dynamic block. I've set it up with the stormwater device as a nested block inside of the dynamic block, so that I can explode all blocks & get the total count. Is there a better solution that doesn't require exploding?

0 Likes
Reply
Accepted solutions (1)
751 Views
6 Replies
Replies (6)

MMcCall402
Mentor
Mentor

You may be able to make an Attribute with fields to the parameters that calculates the number of storm water devices within that block. Then use a data extraction to harvest those attributes into a table that sums them up.  I do this for a block I use for parking spaces.   Could you post a sample block?

Mark Mccall 
CAD Mangler



Hammer Land Engineering


Linkedin

0 Likes

mstamnitz
Explorer
Explorer

Here is the block!

 

I'm not experienced in using / creating data extraction tools so that's something I'd have to look further into. 

0 Likes

MMcCall402
Mentor
Mentor
Accepted solution

Updated block attached with a simple Attribute to figuring out how many cells are in the block.  I added a rectangle construction line and a couple stretch actions to reshape it to the perimeter of the cells.  The attribute uses a field in a formula to access the area of that rectangle and divides it by the area of one cell.  The attribute will then display that number after the block is reshaped with the grips.

 

For a total count of multiple blocks you would need a Data Extraction to pull the value of that attribute from multiple blocks and put it in a table.

 

 

Mark Mccall 
CAD Mangler



Hammer Land Engineering


Linkedin

0 Likes

mstamnitz
Explorer
Explorer

I'm learning some things I didn't know were possible - thanks!!

0 Likes

nick_plaza
Observer
Observer

That is awesome how you added the formulas to count the array blocks. If it’s not too much trouble, could you share the formula you used? I don’t have much experience with formulas, and I’m intrigued by how they work, but I just can’t seem to grasp them. I’m trying to do something similar with my dynamic racks block, and it’s quite a hassle to stretch my block and either count the elements as I stretch it or go back and count them one by one.

0 Likes

MMcCall402
Mentor
Mentor

The block in this post has a rectangular polyline that encompasses the modules and get resized as the modules get arrayed.  The count # is an attribute with a field.  The field has a formula. The formula has a field that gets the area of that rectangle and then does a simple division by the area of one module.  So in this instance its not counting modules, its figuring out how many based on the total area divided by the are of one module.

 

In the formula area you can right-click and choose Insert field.  You can insert multiple fields if needed and do math functions with them.  My initial approach was going to be figuring out how many rows and columns based on the height and width of the total modules but saw that using the area was an easier path.

 

MMcCall402_0-1732722152130.png

 

Mark Mccall 
CAD Mangler



Hammer Land Engineering


Linkedin

0 Likes