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

K

kdrahovsky

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

I cannot find this anywhere?
 
J

John Goldsmith

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
 
K

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
 
J

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
 
K

kdrahovsky

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

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
 
K

kdrahovsky

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

Thank You,
Karl
 
T

Tim West

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
 
P

Paul Herber

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

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

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

Iqbal Hassan

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:

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?

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


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

:

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


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

:

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

:

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

Thank You
Kar

:

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

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.

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/tutorial...c-86feb39cae83/build-a-selected-text-fav.aspx
 
P

Paul Herber

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top