Discussion:
Line length in label?
(too old to reply)
Heather Mills
2011-01-30 00:46:59 UTC
Permalink
Is there any way for me to get the length of a line to be displayed in
the label field (or anywhere)? I would like to be able to draw a line
between 2 points and have the line label display the length -- like
one of the dimension objects do. I'd use them, but they are more
difficult to control.
Paul Herber
2011-02-04 01:37:49 UTC
Permalink
Post by Heather Mills
Is there any way for me to get the length of a line to be displayed in
the label field (or anywhere)? I would like to be able to draw a line
between 2 points and have the line label display the length -- like
one of the dimension objects do. I'd use them, but they are more
difficult to control.
If this is for a straight line shape (rather than a connector) then it is quite easy.
Select the shape, then menu Insert -> Field -> Geometry -> Width
--
Regards, Paul Herber, Sandrila Ltd.
Electronics for Visio http://www.sandrila.co.uk/visio-electronics/
Electrical for Visio http://www.sandrila.co.uk/visio-electrical/
Electronics Packages for Visio http://www.sandrila.co.uk/visio-electronics-packages/
Heather Mills
2011-02-07 05:34:39 UTC
Permalink
Post by Paul Herber
Post by Heather Mills
Is there any way for me to get the length of a line to be displayed in
the label field (or anywhere)? I would like to be able to draw a line
between 2 points and have the line label display the length -- like
one of the dimension objects do. I'd use them, but they are more
difficult to control.
If this is for a straight line shape (rather than a connector) then it is quite easy.
Select the shape, then menu Insert -> Field -> Geometry -> Width
Thank you very much...just what I needed.
Heather Mills
2011-02-07 05:56:21 UTC
Permalink
Post by Paul Herber
Post by Heather Mills
Is there any way for me to get the length of a line to be displayed in
the label field (or anywhere)? I would like to be able to draw a line
between 2 points and have the line label display the length -- like
one of the dimension objects do. I'd use them, but they are more
difficult to control.
If this is for a straight line shape (rather than a connector) then it is quite easy.
Select the shape, then menu Insert -> Field -> Geometry -> Width
Is there any way to get more than one field inserted in the same
object? Can I get both the length and width for a rectangle? I can get
one, but when I insert the other, it replaces the first one.

It also replaces any text that I already had for that object. This is
not a huge problem unless I need to change the format of the field.
Then I have to replace the text, too. Is there any way to avoid that?
Heather Mills
2011-02-07 06:46:33 UTC
Permalink
Post by Heather Mills
Post by Paul Herber
Post by Heather Mills
Is there any way for me to get the length of a line to be displayed in
the label field (or anywhere)? I would like to be able to draw a line
between 2 points and have the line label display the length -- like
one of the dimension objects do. I'd use them, but they are more
difficult to control.
If this is for a straight line shape (rather than a connector) then it is quite easy.
Select the shape, then menu Insert -> Field -> Geometry -> Width
Is there any way to get more than one field inserted in the same
object? Can I get both the length and width for a rectangle? I can get
one, but when I insert the other, it replaces the first one.
It also replaces any text that I already had for that object. This is
not a huge problem unless I need to change the format of the field.
Then I have to replace the text, too. Is there any way to avoid that?
I found the Insert Custom Formula feature. I was able to get both the
height and width using this formula:

="Hgt="&FORMAT(Height,"0.00")&", Wid = "&FORMAT(Width,"0.00")

Is there a better way?

I also discovered how to force a linefeed using CHAR(10):

="Hgt="&FORMAT(Height,"0.00")&char(10)&"Wid="&FORMAT(Width,"0.00")

Is there a better way?
Paul Herber
2011-02-11 10:03:57 UTC
Permalink
Post by Heather Mills
Post by Heather Mills
Post by Paul Herber
Post by Heather Mills
Is there any way for me to get the length of a line to be displayed in
the label field (or anywhere)? I would like to be able to draw a line
between 2 points and have the line label display the length -- like
one of the dimension objects do. I'd use them, but they are more
difficult to control.
If this is for a straight line shape (rather than a connector) then it is quite easy.
Select the shape, then menu Insert -> Field -> Geometry -> Width
Is there any way to get more than one field inserted in the same
object? Can I get both the length and width for a rectangle? I can get
one, but when I insert the other, it replaces the first one.
It also replaces any text that I already had for that object. This is
not a huge problem unless I need to change the format of the field.
Then I have to replace the text, too. Is there any way to avoid that?
I found the Insert Custom Formula feature. I was able to get both the
="Hgt="&FORMAT(Height,"0.00")&", Wid = "&FORMAT(Width,"0.00")
Is there a better way?
I doubt it, looks about right to me.
Post by Heather Mills
="Hgt="&FORMAT(Height,"0.00")&char(10)&"Wid="&FORMAT(Width,"0.00")
Is there a better way?
No, look good as well.
--
Regards, Paul Herber, Sandrila Ltd.
Visio Utilities http://www.sandrila.co.uk/visio-utilities/
Continue reading on narkive:
Loading...