Coordinates of a child shape

E

Elie

Hi there

How can I, in a shapesheet, store the actual value of the coordinates of a child shape and not have visio convert them to a formula
For example I have 2 shapes: shape1 and shape2
Shape1 contains shape2
By default, PinX of shape2 is something like Sheet.45!Width*0.6974
I want to store the PinX as a number, such as 2.0125 and not as a formula referring to the parent (shape1)

Can that be done

Thank
 
C

Chris Roth

Elie,

After you group the shapes, you can open the ShapeSheet for each shape and
type the number in.

1. Subselect a sub-shape
2. Window > Show ShapeSheet
3. View > Values
4. Now just retype the numbers that you see for PinX, PinY


If you're into VBA / Automation, you could write a "dummify" subroutine. The
important parts would be something like this:

Sub Dummify()

' Replace formulas with values for PinX, PinY for all subshapes in a
group...

dim shpGroup as Visio.Shape, shp as Visio.Shape
Set shpGroup = Visio.ActiveWindow.Selection(1)

For Each shp in shpGroup.Shapes
shp.Cells("PinX").Formula = shp.Cells("PinX").ResultIU
shp.Cells("PinY").Formula = shp.Cells("PinY").ResultIU
Next shp

End Sub

--

Hope this helps,

Chris Roth
Visio MVP
visioguy @ extremely warm mail.com

Elie said:
Hi there,

How can I, in a shapesheet, store the actual value of the coordinates of a
child shape and not have visio convert them to a formula?
For example I have 2 shapes: shape1 and shape2.
Shape1 contains shape2.
By default, PinX of shape2 is something like Sheet.45!Width*0.6974.
I want to store the PinX as a number, such as 2.0125 and not as a formula
referring to the parent (shape1).
 

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