Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Line length in label?

120 views
Skip to first unread message

Heather Mills

unread,
Jan 29, 2011, 7:46:59 PM1/29/11
to
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

unread,
Feb 3, 2011, 8:37:49 PM2/3/11
to

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

unread,
Feb 7, 2011, 12:34:39 AM2/7/11
to
On Fri, 04 Feb 2011 01:37:49 +0000, Paul Herber <pa...@pherber.com>
wrote:

>On Sat, 29 Jan 2011 16:46:59 -0800, Heather Mills <hsm...@yahoo.com> wrote:
>
>>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

unread,
Feb 7, 2011, 12:56:21 AM2/7/11
to
On Fri, 04 Feb 2011 01:37:49 +0000, Paul Herber <pa...@pherber.com>
wrote:

>On Sat, 29 Jan 2011 16:46:59 -0800, Heather Mills <hsm...@yahoo.com> wrote:


>
>>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

unread,
Feb 7, 2011, 1:46:33 AM2/7/11
to
On Sun, 06 Feb 2011 21:56:21 -0800, Heather Mills <hsm...@yahoo.com>
wrote:

>On Fri, 04 Feb 2011 01:37:49 +0000, Paul Herber <pa...@pherber.com>
>wrote:
>
>>On Sat, 29 Jan 2011 16:46:59 -0800, Heather Mills <hsm...@yahoo.com> wrote:
>>
>>>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

unread,
Feb 11, 2011, 5:03:57 AM2/11/11
to
On Sun, 06 Feb 2011 22:46:33 -0800, Heather Mills <hsm...@yahoo.com> wrote:

>On Sun, 06 Feb 2011 21:56:21 -0800, Heather Mills <hsm...@yahoo.com>
>wrote:
>
>>On Fri, 04 Feb 2011 01:37:49 +0000, Paul Herber <pa...@pherber.com>
>>wrote:
>>
>>>On Sat, 29 Jan 2011 16:46:59 -0800, Heather Mills <hsm...@yahoo.com> wrote:
>>>
>>>>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 doubt it, looks about right to me.


>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?

No, look good as well.


--
Regards, Paul Herber, Sandrila Ltd.

Visio Utilities http://www.sandrila.co.uk/visio-utilities/

0 new messages