I'm looking for a way to create dynamic text. I have a rectangle representing a sheet of plywood. I have text in the middle of the sheet that says 4'-0" x 8'-0". If I stretch that sheet I'd like it to update the text showing the new size of the rectangle. Any ideas?
Any idea what the formula needs to be or a good website that explains how to write formulas for fields? I chose Object but don't see where I can choose the x length and y length. There is a length property but that gives me the perimeter length.
Yes, the fact you are using a rectangle makes it a little more complicated!
Can you "embed" two more lines (horizontal and vertical), maybe on a "noplot" layer, and link the fields to the length property of these lines?
Another option would be to create a dynamic block, which can also use fields.
I’d rather not do lines just in case the line and the object don’t get stretched together.
I thought that if the "extra" horizontal and vertical lines coincided with the corresponding sides of the rectangle it would be difficult to stretch one without stretching the other, even if you prefer grip editing, but I guess the potential is there so I understand your hesitance.
How would the dynamic block work?
I think it could be a fairly simple dynamic block, consisting of a rectangle made up of four lines (the polyline rectangle doesn't give you any advantage here) and the mtext with embedded fields linked to the length property of one of the horizontal and one of the vertical lines. There would be a horizontal and a vertical stretch action for the length and width, and you would probably want the mtext "label" to stay in the center, so there would have to be stretch action(s) for that, too (although you could simplify things by anchoring the text to one corner).
An alternative to this would be to use geometric constraints in the DB. If there is a relatively finite set of length and width dimensions (or combinations of the two), it might work better to pick them from a list (block properties table) rather than having the user stretch the dimensions.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register