Text changing based on linear distance list

Text changing based on linear distance list

MLanteigne
Explorer Explorer
2,676 Views
8 Replies
Message 1 of 9

Text changing based on linear distance list

MLanteigne
Explorer
Explorer

I am creating dynamic blocks to help with the effectiveness of our AutoCAD use at work.

 

One of the blocks I am trying to create would be a simple rectangle with a stretch action to represent the various sizes of baseboard heaters available. Were I am having difficulty, is that I would also like to have a text above the heater symbol to describe the type of heater used and that would update to the appropriate descriptor as the heater was stretched.

I'm wondering if there are any tables, attributes or combination which would allow me to create the desired effect. The hope is to maximize the ease of use for our operators with a minimal amount of grips.

 

Thank you and looking forward to any feedback 🙂

0 Likes
Accepted solutions (1)
2,677 Views
8 Replies
Replies (8)
Message 2 of 9

steven-g
Mentor
Mentor

It would be a lot easier to use visibilitystates and select the heater type by name, which would then show the appropriate sized rectange, another option would be a block lookup table with sizes for the heaters, it would also be possible using stretch grips but would probably involve multiple double lookups using range data.It depends a lot on what the different sizes are, if you can provide more details no doubt someone could give you a few pointers.

0 Likes
Message 3 of 9

MLanteigne
Explorer
Explorer

Thank you, I had thought of the visibility states at first but was curious if there was a way of avoiding a lengthy list. It's not so bad for this situation as there are only 10 heaters.

However, I think you're right that for this application it may be the easiest solution.

 

Out of curiosity, are there constraints that can be applied to the text in a dynamic block as to have it always line up in a readable state regardless of the rest of the block being set to align with adjacent surface?

 

Thanks again, I appreciate the help!

0 Likes
Message 4 of 9

steven-g
Mentor
Mentor

There is a setting in the text styles dialogue, you have to use an annotative text style, but when you set that up there is a tick box that makes sure text is always aligned to the layout no matter which way your block is rotated.

 

AnnoText.jpg

0 Likes
Message 5 of 9

h_s_walker
Mentor
Mentor

Here's a quick block I created. It automatically changes the text (visibility state) you can see depending on the length of the block.

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

Message 6 of 9

MLanteigne
Explorer
Explorer

Thank you for offering an example but I'm using the 2011 version of CAD.

Would you be able to resend the file saved to an appropriate version?

 

Again, thank you!

0 Likes
Message 7 of 9

MMcCall402
Mentor
Mentor
Accepted solution

Try out the attached block. 

 

The linear parameter for the stretch action is limited to a list of values.

There is a Lookup parameter/action that will match those values with a name in its table.

The label for the unit is a block attribute with a field for its default value. The field references the name value supplied by the Lookup.

The liner parameter has a move action to keep the attribute centered by moving 0.5 times the parameter distance. (Distance multiplier)

 

The block can be operated from the grip for stretching the unit to the preset distances in the list. After a regen the attribute will update to the new name for that size.

 

The block can also be operated from the grip on the Lookup parameter. This will show a list of the unit names. Selecting a name will operate the linear parameter to the size that matched that name in the Lookup.  Regen to update the name in the attribute.

Mark Mccall 
CAD Mangler


EESignature


VHB - Vanasse Hangen Brustlin, Inc.


Linkedin

0 Likes
Message 8 of 9

h_s_walker
Mentor
Mentor

Here you go

 

I've created four visibility states in which the text changes only. The stretching rectangle is common to all.

 

I've created a double lookup table in which one table references the length of the stretch and creates a "value" depending on the length of the stretch.

The other lookup table changes the visibility state depending on the "value" that the other lookup table has given it

 

 

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

0 Likes
Message 9 of 9

MLanteigne
Explorer
Explorer

Thank you all!

All of this information will be so helpful in allowing me to create the required blocks for my office. I already see a multitude of scenarios in which I can use all of these examples. I'm very excited for about the new skills I'll be able to develop with all of your help!

0 Likes