Selectable/Replaceable Blocks

Selectable/Replaceable Blocks

will9ESP8
Explorer Explorer
1,808 Views
6 Replies
Message 1 of 7

Selectable/Replaceable Blocks

will9ESP8
Explorer
Explorer

I have a set of blocks, each one called a variation of 'MOTOR'. Each one has a set of attributes we can change  manually, as well as two attributes auto populating the x and y coordinates. When we create our drawing we take our best guess at which motors we'll need, but invariably after we get further down the road and run calculations we change some of them. It would be great if I could change out individual blocks, and retain the attributes. And even better would be to somehow 'select' the correct block from a list, instead of a normal delete/insert/move/copy/whatever routine.

 

So say I have the block 'MOTOR-1 TON-08', populated with attributes Cable as: 25', X Coordinate as: 10' and Y Coordinate as: 20'. Then I decide I would rather have the block 'MOTOR-.5TON-08', but with all the same attributes. And I only want to replace that one motor, not all throughout the drawing. Does that make sense? Thanks in advance...

0 Likes
Accepted solutions (1)
1,809 Views
6 Replies
Replies (6)
Message 2 of 7

MMcCall402
Mentor
Mentor

Try this:

Select the motor you want to swap to a different one.

In the properties window there is a row that lists the block's name.

At the end of that row there is a button that will bring up a menu for you to choose another block to use instead of the one it currently is.

If the attributes have the same name then they should be maintained thru the swap.

 

 

Mark Mccall 
CAD Mangler


EESignature


VHB - Vanasse Hangen Brustlin, Inc.


Linkedin

0 Likes
Message 3 of 7

will9ESP8
Explorer
Explorer

Thanks, that is pretty slick, and a great solution. I'll use it for now, but,,,

 

I did just discover the visibility parameter, and somewhat learned how to use it. Now I can make a bunch of different motor types, and swap them out from a simple drop down list that pops up from the visibility grip. Very cool. But, I can't BCOUNT that type of block. And, I haven't figured out how to make data extract work quite right. I'll play with it some more, but I may create another thread asking about these features specifically.

 

If you do happen to know off the top of your head, my question is say I have 1 block, with 7 different visibility setups. I use whichever visibility status gives me the correct motor. I do a data extract, but it counts them all as the same block. I can put in attributes and count them, but don't want to have to change the attribute every single time just for the type of motor - that would be counter-productive. Any ideas on how to get around this?

0 Likes
Message 4 of 7

MMcCall402
Mentor
Mentor
Accepted solution

Look into using the COUNT command.  It can count blocks, along with properties of those blocks, and show them in a window or place them in a table within the drawing.  One of those properties is the current visibility state of the blocks selected.  Just name the visibility states to match the model of the motors. The selection set can be a selected blocks, a windowed area, within a polyline, or the entire drawing.  The table produced is sort of 'live', as in it will update as things change within the selection set of blocks.

 

Similarly, a data extraction can extract the visibility state of a block, it just needs to be a selected property during the extraction process.  The extraction is a little more cumbersome than the count command and requires the creation of an external file.

 

As for swapping them, visibility states for each model type is a better way to handle it.  You can select multiple blocks at once and change their visibility state in the properties window if needed.

 

If you want attributes to be set when you choose a visibility state look into adding a Block Properties Table. There you can make a table of the visibility states and the values of the attributes that should go along with each one.

 

 

Mark Mccall 
CAD Mangler


EESignature


VHB - Vanasse Hangen Brustlin, Inc.


Linkedin

0 Likes
Message 5 of 7

will9ESP8
Explorer
Explorer

Thanks, both of those options seem to work well.

 

Plus I added drop down menus for some of the other attributes as well. My blocks are now 1000 times more powerful then before - thanks!

0 Likes
Message 6 of 7

shane_owensBCG7H
Community Visitor
Community Visitor

why would my block name be greyed out in the properties window? (and not changeable) 

0 Likes
Message 7 of 7

MMcCall402
Mentor
Mentor

Is it on a locked layer?

 

The block name is always grey in the properties window but there is a button next to it so you can select a new one.

 

 

Mark Mccall 
CAD Mangler


EESignature


VHB - Vanasse Hangen Brustlin, Inc.


Linkedin

0 Likes