Community
Dynamic Blocks Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dynamic length of block from length of attribute text

4 REPLIES 4
Reply
Message 1 of 5
nilesh33
7433 Views, 4 Replies

Dynamic length of block from length of attribute text

Hi Friends,

 

I have a simple block in which the 'attribute' is defined & placed inside the rectangle. (so it looks like text with rectangular border around)

 

Now question is, can we edit this into dynamic block such that,

 

1. It should change the length of rectangle as per the 'length of attribute text'

2. It should change the width of rectangle as per the 'height of attribute text'

 

My first try,

 

I have applied the distance parameter and linear stretch action to the one end of rectangle. So now I have grip from which I can edit the length of block. (I guess, i can do it same way for height)

 

Any suggestion or help is appreciated.

 

Thanks,

Nilesh

 

 

4 REPLIES 4
Message 2 of 5
AcadAdamLT
in reply to: nilesh33

It's unfortunately not possible to control parameters based on the value of attributes.

You'll have to edit the rectangle manually by grips.

 

Closest you can get too controlling parameters via Attributes is by using a block property table. But then the values has to be specified in the BPT.

Signature, sincerely... //Adam
AutoCad LT 2016
Give Kudos where credit is due, Mark "accepted as solution" if the post solved your question.
Message 3 of 5
ojuris
in reply to: nilesh33

check this

 

Juris

Message 4 of 5
Libbya
in reply to: nilesh33

I do not know a way that out-of-the-box you can drive the size of the rectangle by the attribute input.  You can go the other way, though, which accomplishes the same end result and have the attribute text update with changes in the size.  To do so, add a field as the defualt value for your attribute.  Select BlockPlaceholder and select Distance1.  You will have to insert a new occurrence of the block for the new default value to be in effect.  You will need to regen after changing the size for the field to update.  See attached.

Message 5 of 5
jomartinez2G9JM
in reply to: ojuris

Hi,

 

I'm not sure what the "DATA" phrase is supposed to represent. It doesn't seem to be linked to the rectangle except for them being in the same block.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

”Boost

 

”Tips

 

”Services