Custom Shape Area Display

Started by visioboy, December 22, 2023, 05:04:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

visioboy

I'm trying to create a rectangular shape that will display both the overall dimensions and the calculated area in square feet.  If the shape dimensions change, those values should update.

I have a shape that will show the dimensions and update automatically but it does not have the calculated area.  The stock "area" shape shows the area in SF but not the overall dimensions.  Is there a way to combine both of these into one shape?  Ideally the text would look something like this:

50' X 10'
500 SF

I've tried digging into the ShapeSheet data and was fine with getting the width and height to display using Text Fields with a value of Width & " X " & Height.  But the area ShapeSheet is much more complicated and I can't seem to figure that one out.  I really just want the calculated area in SF added to the shape I already have showing the dimensions.

Any help is greatly appreciated  :D

wapperdude

Assuming that your shape is simple rectangle, then width*height will calculate area.  Create a User defined cell, and enter that formula.  Then use Field Insert to display the result.

If the width and height dimensions are ft, or ft and inches, the result will be sq ft.  If both width and height are inches, then result will be sq inches.  Divide that by 144 to convert to sq ft.
Visio 2019 Pro

visioboy

Thanks, I've almost got it perfect now.  The last thing is to turn off the unit display for the area.  Right now the shape has two lines of text that look like this:

2' 6" X 3'
7.5FT.^2

I'd like to get rid of the FT.^2 callout and change it to read 7.5 SF instead.

I am generating the text for the shape with a text field coded like this:

=Width&" X "&Height&CHAR(10)&User.ShapeArea

Is there some way to turn off the unit display for my User.ShapArea value and/or replace it with "SF"?

Surrogate

#3
Quote from: visioboy on December 26, 2023, 06:35:21 PM
Is there some way to turn off the unit display for my User.ShapArea value and/or replace it with "SF"?
You can play with output formats like:

With use FIELDPICTURE function...


Updated Hope this article can helps!

wapperdude

In User cell, use this formula to show "sq in".   Modify as desired.  =FORMATEX(Width*Height,"0.### uu","sq in","sq in")
Visio 2019 Pro