Discussion:
How do I? Make 1 visio shape same size as another-NotUsingHandles?
(too old to reply)
kdrahovsky
2007-08-28 13:46:01 UTC
Permalink
How Do I make 1 Visio Shape the same size as another one, without using the
shapes handles?

I cannot find this anywhere?
John Goldsmith
2007-08-28 13:54:19 UTC
Permalink
Use the Size & Position Window under the View menu. You can also use basic
calculations in there as well, for example:

Height: 2ft+1in

...and of course there's always the shapesheet (Window/Show ShapeSheet) if
you want to get deeper into how shapes behave.

Best regards

John


John Goldsmith
www.visualSignals.co.uk
Post by kdrahovsky
How Do I make 1 Visio Shape the same size as another one, without using the
shapes handles?
I cannot find this anywhere?
kdrahovsky
2007-08-28 14:26:03 UTC
Permalink
Thanks Jon, this helps a little. Still you must type in the size. More
specifically, I apologise, perhaps a "Make Same Size" button. For example,
like other applications, you can typically highlight a first object, then a
2nd object, then you can go to an option/menu that states "Make the Same
Size." Then the 2nd object takes on the same sizing (H & W) of the 1st
object.

Thanks,
Karl
Post by John Goldsmith
Use the Size & Position Window under the View menu. You can also use basic
Height: 2ft+1in
....and of course there's always the shapesheet (Window/Show ShapeSheet) if
you want to get deeper into how shapes behave.
Best regards
John
John Goldsmith
www.visualSignals.co.uk
Post by kdrahovsky
How Do I make 1 Visio Shape the same size as another one, without using the
shapes handles?
I cannot find this anywhere?
John Goldsmith
2007-08-28 15:23:08 UTC
Permalink
Hello Karl,

Sorry, I misunderstood the question. I'm afraid there's no direct command
that does what you're looking for (of course you can duplicate (ctrl+D)).

You could achieve this fairly simply with code.

Best regards

John


John Goldsmith
www.visualSignals.co.uk
Post by kdrahovsky
Thanks Jon, this helps a little. Still you must type in the size. More
specifically, I apologise, perhaps a "Make Same Size" button. For example,
like other applications, you can typically highlight a first object, then a
2nd object, then you can go to an option/menu that states "Make the Same
Size." Then the 2nd object takes on the same sizing (H & W) of the 1st
object.
Thanks,
Karl
Post by John Goldsmith
Use the Size & Position Window under the View menu. You can also use basic
Height: 2ft+1in
....and of course there's always the shapesheet (Window/Show ShapeSheet) if
you want to get deeper into how shapes behave.
Best regards
John
John Goldsmith
www.visualSignals.co.uk
Post by kdrahovsky
How Do I make 1 Visio Shape the same size as another one, without using the
shapes handles?
I cannot find this anywhere?
kdrahovsky
2007-08-28 16:06:01 UTC
Permalink
Thanks. At least I know I am not overlooking something. Seems so basic of a
feature to be added in their future.
Post by John Goldsmith
Hello Karl,
Sorry, I misunderstood the question. I'm afraid there's no direct command
that does what you're looking for (of course you can duplicate (ctrl+D)).
You could achieve this fairly simply with code.
Best regards
John
John Goldsmith
www.visualSignals.co.uk
Post by kdrahovsky
Thanks Jon, this helps a little. Still you must type in the size. More
specifically, I apologise, perhaps a "Make Same Size" button. For example,
like other applications, you can typically highlight a first object, then a
2nd object, then you can go to an option/menu that states "Make the Same
Size." Then the 2nd object takes on the same sizing (H & W) of the 1st
object.
Thanks,
Karl
Post by John Goldsmith
Use the Size & Position Window under the View menu. You can also use basic
Height: 2ft+1in
....and of course there's always the shapesheet (Window/Show ShapeSheet) if
you want to get deeper into how shapes behave.
Best regards
John
John Goldsmith
www.visualSignals.co.uk
Post by kdrahovsky
How Do I make 1 Visio Shape the same size as another one, without using the
shapes handles?
I cannot find this anywhere?
Fred Diggs
2007-08-31 23:24:20 UTC
Permalink
Here is a macro that will do the trick.

Public Sub MakeSameSize()
'Makes two objects in a selection list the same size by setting the Width and
'Height of the second item to the Width and Height of the first item.
ActiveWindow.Selection.Item(2).Cells("Width").ResultIU =
ActiveWindow.Selection.Item(1).Cells("Width").ResultIU
ActiveWindow.Selection.Item(2).Cells("Height").ResultIU =
ActiveWindow.Selection.Item(1).Cells("Height").ResultIU
End Sub
Post by kdrahovsky
Thanks. At least I know I am not overlooking something. Seems so basic of a
feature to be added in their future.
Post by John Goldsmith
Hello Karl,
Sorry, I misunderstood the question. I'm afraid there's no direct command
that does what you're looking for (of course you can duplicate (ctrl+D)).
You could achieve this fairly simply with code.
Best regards
John
John Goldsmith
www.visualSignals.co.uk
Post by kdrahovsky
Thanks Jon, this helps a little. Still you must type in the size. More
specifically, I apologise, perhaps a "Make Same Size" button. For example,
like other applications, you can typically highlight a first object, then a
2nd object, then you can go to an option/menu that states "Make the Same
Size." Then the 2nd object takes on the same sizing (H & W) of the 1st
object.
Thanks,
Karl
Post by John Goldsmith
Use the Size & Position Window under the View menu. You can also use basic
Height: 2ft+1in
....and of course there's always the shapesheet (Window/Show ShapeSheet) if
you want to get deeper into how shapes behave.
Best regards
John
John Goldsmith
www.visualSignals.co.uk
Post by kdrahovsky
How Do I make 1 Visio Shape the same size as another one, without using the
shapes handles?
I cannot find this anywhere?
kdrahovsky
2007-09-01 12:50:00 UTC
Permalink
Very nice. Much appreciated, applied and worked like a charm.

Thank You,
Karl
Post by Fred Diggs
Here is a macro that will do the trick.
Public Sub MakeSameSize()
'Makes two objects in a selection list the same size by setting the Width and
'Height of the second item to the Width and Height of the first item.
ActiveWindow.Selection.Item(2).Cells("Width").ResultIU =
ActiveWindow.Selection.Item(1).Cells("Width").ResultIU
ActiveWindow.Selection.Item(2).Cells("Height").ResultIU =
ActiveWindow.Selection.Item(1).Cells("Height").ResultIU
End Sub
Post by kdrahovsky
Thanks. At least I know I am not overlooking something. Seems so basic of a
feature to be added in their future.
Post by John Goldsmith
Hello Karl,
Sorry, I misunderstood the question. I'm afraid there's no direct command
that does what you're looking for (of course you can duplicate (ctrl+D)).
You could achieve this fairly simply with code.
Best regards
John
John Goldsmith
www.visualSignals.co.uk
Post by kdrahovsky
Thanks Jon, this helps a little. Still you must type in the size. More
specifically, I apologise, perhaps a "Make Same Size" button. For example,
like other applications, you can typically highlight a first object, then a
2nd object, then you can go to an option/menu that states "Make the Same
Size." Then the 2nd object takes on the same sizing (H & W) of the 1st
object.
Thanks,
Karl
Post by John Goldsmith
Use the Size & Position Window under the View menu. You can also use basic
Height: 2ft+1in
....and of course there's always the shapesheet (Window/Show ShapeSheet) if
you want to get deeper into how shapes behave.
Best regards
John
John Goldsmith
www.visualSignals.co.uk
Post by kdrahovsky
How Do I make 1 Visio Shape the same size as another one, without using
the
shapes handles?
I cannot find this anywhere?
unknown
2008-05-23 06:14:20 UTC
Permalink
Guys,

I know this is an old thread, but a quick improvement (works for > 2 items selected, won't complain if no items selected):

Public Sub MakeSameSize()
Dim width As Double, height As Double
If ActiveWindow.Selection.Count > 0 Then
With ActiveWindow.Selection
width = .Item(1).Cells("Width").ResultIU
height = .Item(1).Cells("Height").ResultIU
For i = 2 To ActiveWindow.Selection.Count
.Item(i).Cells("Width").ResultIU = width
.Item(i).Cells("Height").ResultIU = height
Next i
End With
End If
End Sub


-Tim
Paul Herber
2008-05-23 12:57:00 UTC
Permalink
Post by Fred Diggs
Guys,
Public Sub MakeSameSize()
Dim width As Double, height As Double
If ActiveWindow.Selection.Count > 0 Then
With ActiveWindow.Selection
width = .Item(1).Cells("Width").ResultIU
height = .Item(1).Cells("Height").ResultIU
For i = 2 To ActiveWindow.Selection.Count
.Item(i).Cells("Width").ResultIU = width
.Item(i).Cells("Height").ResultIU = height
Next i
End With
End If
End Sub
How do you ensure that you pick up the width and height from the
correct shape? If you have two shapes, which shape is Item(1)?
--
Regards, Paul Herber, Sandrila Ltd.
Visio Utilities http://www.visio-utilities.sandrila.co.uk/
John Marshall, MVP
2008-05-25 16:04:40 UTC
Permalink
It is in the order of selection, so the first item selected is item(1)

John... Visio MVP

Need stencils or ideas? http://visio.mvps.org/3rdparty.htm
Need VBA examples? http://visio.mvps.org/VBA.htm
Visio Wishlist http://visio.mvps.org/wish_list.htm
Post by Paul Herber
Post by unknown
Guys,
I know this is an old thread, but a quick improvement (works for > 2 items
Public Sub MakeSameSize()
Dim width As Double, height As Double
If ActiveWindow.Selection.Count > 0 Then
With ActiveWindow.Selection
width = .Item(1).Cells("Width").ResultIU
height = .Item(1).Cells("Height").ResultIU
For i = 2 To ActiveWindow.Selection.Count
.Item(i).Cells("Width").ResultIU = width
.Item(i).Cells("Height").ResultIU = height
Next i
End With
End If
End Sub
How do you ensure that you pick up the width and height from the
correct shape? If you have two shapes, which shape is Item(1)?
--
Regards, Paul Herber, Sandrila Ltd.
Visio Utilities http://www.visio-utilities.sandrila.co.uk/
Paul Herber
2008-05-26 22:15:33 UTC
Permalink
Ah, that's interesting and certainly makes sense. I wonder what the
order is if an enclosing area is selected with the mouse?


On Sun, 25 May 2008 12:04:40 -0400, "John Marshall, MVP"
Post by John Marshall, MVP
It is in the order of selection, so the first item selected is item(1)
John... Visio MVP
Need stencils or ideas? http://visio.mvps.org/3rdparty.htm
Need VBA examples? http://visio.mvps.org/VBA.htm
Visio Wishlist http://visio.mvps.org/wish_list.htm
Post by Paul Herber
Post by unknown
Guys,
I know this is an old thread, but a quick improvement (works for > 2 items
Public Sub MakeSameSize()
Dim width As Double, height As Double
If ActiveWindow.Selection.Count > 0 Then
With ActiveWindow.Selection
width = .Item(1).Cells("Width").ResultIU
height = .Item(1).Cells("Height").ResultIU
For i = 2 To ActiveWindow.Selection.Count
.Item(i).Cells("Width").ResultIU = width
.Item(i).Cells("Height").ResultIU = height
Next i
End With
End If
End Sub
How do you ensure that you pick up the width and height from the
correct shape? If you have two shapes, which shape is Item(1)?
--
Regards, Paul Herber, Sandrila Ltd
http://www.electronics-packages.sandrila.co.uk/
John Goldsmith
2008-05-27 06:21:05 UTC
Permalink
Hmm - I'd assumed it would be first ID or at least drop order, but I've just
had a quick check and I see that it's the left-most shape that becomes the
primary item.

Best regards

John


John Goldsmith
www.visualSignals.typepad.co.uk
www.visualSignals.co.uk
Post by Paul Herber
Ah, that's interesting and certainly makes sense. I wonder what the
order is if an enclosing area is selected with the mouse?
On Sun, 25 May 2008 12:04:40 -0400, "John Marshall, MVP"
Post by John Marshall, MVP
It is in the order of selection, so the first item selected is item(1)
John... Visio MVP
Need stencils or ideas? http://visio.mvps.org/3rdparty.htm
Need VBA examples? http://visio.mvps.org/VBA.htm
Visio Wishlist http://visio.mvps.org/wish_list.htm
Post by Paul Herber
Post by unknown
Guys,
I know this is an old thread, but a quick improvement (works for > 2 items
Public Sub MakeSameSize()
Dim width As Double, height As Double
If ActiveWindow.Selection.Count > 0 Then
With ActiveWindow.Selection
width = .Item(1).Cells("Width").ResultIU
height = .Item(1).Cells("Height").ResultIU
For i = 2 To ActiveWindow.Selection.Count
.Item(i).Cells("Width").ResultIU = width
.Item(i).Cells("Height").ResultIU = height
Next i
End With
End If
End Sub
How do you ensure that you pick up the width and height from the
correct shape? If you have two shapes, which shape is Item(1)?
--
Regards, Paul Herber, Sandrila Ltd
http://www.electronics-packages.sandrila.co.uk/
t***@gmail.com
2015-05-18 12:34:53 UTC
Permalink
Post by Paul Herber
Post by Fred Diggs
Guys,
Public Sub MakeSameSize()
Dim width As Double, height As Double
If ActiveWindow.Selection.Count > 0 Then
With ActiveWindow.Selection
width = .Item(1).Cells("Width").ResultIU
height = .Item(1).Cells("Height").ResultIU
For i = 2 To ActiveWindow.Selection.Count
.Item(i).Cells("Width").ResultIU = width
.Item(i).Cells("Height").ResultIU = height
Next i
End With
End If
End Sub
How do you ensure that you pick up the width and height from the
correct shape? If you have two shapes, which shape is Item(1)?
--
Regards, Paul Herber, Sandrila Ltd.
Visio Utilities http://www.visio-utilities.sandrila.co.uk/
Thanks Great stuff..love it :)
Deniel Strenadjko
2022-06-28 08:48:06 UTC
Permalink
Post by t***@gmail.com
Post by Paul Herber
Post by Fred Diggs
Guys,
Public Sub MakeSameSize()
Dim width As Double, height As Double
If ActiveWindow.Selection.Count > 0 Then
With ActiveWindow.Selection
width = .Item(1).Cells("Width").ResultIU
height = .Item(1).Cells("Height").ResultIU
For i = 2 To ActiveWindow.Selection.Count
.Item(i).Cells("Width").ResultIU = width
.Item(i).Cells("Height").ResultIU = height
Next i
End With
End If
End Sub
How do you ensure that you pick up the width and height from the
correct shape? If you have two shapes, which shape is Item(1)?
--
Regards, Paul Herber, Sandrila Ltd.
Visio Utilities http://www.visio-utilities.sandrila.co.uk/
Thanks Great stuff..love it :)
7 Years later, Still works great :) Thank you!

unknown
2010-02-21 11:36:34 UTC
Permalink
How Do I make 1 Visio Shape the same size as another one, without using the
shapes handles?



kdrahovsk wrote:

How do I? Make 1 visio shape same size as another-NotUsingHandles?
28-Aug-07

How Do I make 1 Visio Shape the same size as another one, without using th
shapes handles

I cannot find this anywhere?

Previous Posts In This Thread:

On Tuesday, August 28, 2007 9:46 AM
kdrahovsk wrote:

How do I? Make 1 visio shape same size as another-NotUsingHandles?
How Do I make 1 Visio Shape the same size as another one, without using th
shapes handles

I cannot find this anywhere?

On Tuesday, August 28, 2007 9:54 AM
John Goldsmith wrote:

Use the Size & Position Window under the View menu.
Use the Size & Position Window under the View menu. You can also use basic
calculations in there as well, for example

Height: 2ft+1i

....and of course there's always the shapesheet (Window/Show ShapeSheet) if
you want to get deeper into how shapes behave

Best regard

Joh

John Goldsmit
www.visualSignals.co.u

"kdrahovsky" <***@discussions.microsoft.com> wrote in message news:53F47877-82AB-4485-93D7-***@microsoft.com...

On Tuesday, August 28, 2007 10:26 AM
kdrahovsk wrote:

Thanks Jon, this helps a little. Still you must type in the size.
Thanks Jon, this helps a little. Still you must type in the size. More
specifically, I apologise, perhaps a "Make Same Size" button. For example,
like other applications, you can typically highlight a first object, then a
2nd object, then you can go to an option/menu that states "Make the Same
Size." Then the 2nd object takes on the same sizing (H & W) of the 1st
object

Thanks
Kar

"John Goldsmith" wrote:

On Tuesday, August 28, 2007 11:23 AM
John Goldsmith wrote:

Hello Karl,Sorry, I misunderstood the question.
Hello Karl

Sorry, I misunderstood the question. I'm afraid there's no direct command
that does what you're looking for (of course you can duplicate (ctrl+D))

You could achieve this fairly simply with code

Best regard

Joh

John Goldsmit
www.visualSignals.co.u

"kdrahovsky" <***@discussions.microsoft.com> wrote in message news:E25F0504-60DE-4163-9423-***@microsoft.com...

On Tuesday, August 28, 2007 12:06 PM
kdrahovsk wrote:

Thanks. At least I know I am not overlooking something.
Thanks. At least I know I am not overlooking something. Seems so basic of
feature to be added in their future

"John Goldsmith" wrote:

On Friday, August 31, 2007 7:24 PM
FredDigg wrote:

Here is a macro that will do the trick.
Here is a macro that will do the trick

Public Sub MakeSameSize(
'Makes two objects in a selection list the same size by setting the Width and
'Height of the second item to the Width and Height of the first item
ActiveWindow.Selection.Item(2).Cells("Width").ResultIU =
ActiveWindow.Selection.Item(1).Cells("Width").ResultI
ActiveWindow.Selection.Item(2).Cells("Height").ResultIU =
ActiveWindow.Selection.Item(1).Cells("Height").ResultI
End Su

"kdrahovsky" wrote:

On Saturday, September 01, 2007 8:50 AM
kdrahovsk wrote:

Very nice. Much appreciated, applied and worked like a charm.
Very nice. Much appreciated, applied and worked like a charm

Thank You
Kar

"Fred Diggs" wrote:

On Friday, May 23, 2008 2:14 AM
Tim West wrote:

A quick improvement
Guys,

I know this is an old thread, but a quick improvement (works for > 2 items selected, won't complain if no items selected):

Public Sub MakeSameSize()
Dim width As Double, height As Double
If ActiveWindow.Selection.Count > 0 Then
With ActiveWindow.Selection
width = .Item(1).Cells("Width").ResultIU
height = .Item(1).Cells("Height").ResultIU
For i = 2 To ActiveWindow.Selection.Count
.Item(i).Cells("Width").ResultIU = width
.Item(i).Cells("Height").ResultIU = height
Next i
End With
End If
End Sub


-Tim

On Wednesday, March 25, 2009 2:30 PM
Avi Nahir wrote:

Great, if only
Great, if only you'd tell me how to make Visio recognize this sub, and how do I activate it from the user interface.

I went to Tools/Macro/Visual Basic Editor. Then Insert/Module and pasted the Sub into the new module added (auto-named Module1).

I returned to Visio's main button, selected a few shapes and then Tools/Macro/Module1/MakeSameSize.

Great. Working. Thanks.

On Friday, June 26, 2009 1:08 PM
Tbone wrote:

Thanks for updated code
You are required to be a member to post replies. After logging in or becoming a member, you will be redirected back to this page.


Submitted via EggHeadCafe - Software Developer Portal of Choice
Build a Selected Text Favorites Utility for your Web Site
http://www.eggheadcafe.com/tutorials/aspnet/d72a2557-4ffd-4d29-bf1c-86feb39cae83/build-a-selected-text-fav.aspx
Paul Herber
2010-02-22 12:51:45 UTC
Permalink
Post by kdrahovsky
How Do I make 1 Visio Shape the same size as another one, without using the
shapes handles?
A simple example: say you have two rectangles, Rectangle.1 and Rectangle.2 and you want
Rectangle.1 to always be the same size as Rectangle.2

1. Select Rectangle.1
2. menu Window -> Show Shapesheet
3. edit cell "Width" to be =GUARD(Rectangle.2!Width)
4. edit cell "Height" to be =GUARD(Rectangle.2!Height)
--
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/
Loading...