Pin Position....

J

Joe

I have not been able to find a way to set the Pin Position.

I can get the Width from this: shpRectObj.Cells("Width")
But there doesn't seem to be a corresponding setting for "Pin Position"
I've tried every combination that I can think of, but no joy.

It would be nice to loop through the Cells (or see them in the Watch window).

Any thoughts.
 
P

Paul Herber

I have not been able to find a way to set the Pin Position.

I can get the Width from this: shpRectObj.Cells("Width")
But there doesn't seem to be a corresponding setting for "Pin Position"
I've tried every combination that I can think of, but no joy.

PinX
PinY
 
J

Joe

Paul,

Thanks for the reply. I think that my request wasn't entirely clear. What
I wanted
to do was to set the Pin Pos from the default of Center-Center to
Center-Left. That
way when I made the rectangle larger it was only in to direction that I
wanted
instead of splitting the distance right and left.

I did find a way around it. I got the PinX before changing the width then
changed
the width, then reset the PinX position by taking the width difference and
dividing
that by 2.

dPinLeft = shpRectObj.Cells("PinX")
shpRectObj.Cells("Width") = shpRectObj.Cells("Width") + 2.25
shpRectObj.Cells("PinX") = dPinLeft + (2.25 / 2)

That does what I was looking to do. Although if I could have set the
Pin-Pos to
Center-Left I wouldn't have had to do any math or resetting the PinX.

I'm always looking for the easiest way to do something.
 
P

Paul Herber

In that case have a look at
LocPinX
LocPinY

Paul,

Thanks for the reply. I think that my request wasn't entirely clear. What
I wanted
to do was to set the Pin Pos from the default of Center-Center to
Center-Left. That
way when I made the rectangle larger it was only in to direction that I
wanted
instead of splitting the distance right and left.

I did find a way around it. I got the PinX before changing the width then
changed
the width, then reset the PinX position by taking the width difference and
dividing
that by 2.

dPinLeft = shpRectObj.Cells("PinX")
shpRectObj.Cells("Width") = shpRectObj.Cells("Width") + 2.25
shpRectObj.Cells("PinX") = dPinLeft + (2.25 / 2)

That does what I was looking to do. Although if I could have set the
Pin-Pos to
Center-Left I wouldn't have had to do any math or resetting the PinX.

I'm always looking for the easiest way to do something.
 
M

Markus Breugst

Hi Joe,

do you mean the x and y positions of a shape? The cells are named "PinX" and
"PinY".

Best regards,
Markus
 
C

Chris [Visio MVP]

Also, check out the Developer Reference under CellsSRC. This allows you to
access Visio cells via Section, Row, Column, which lets you iterate through
the various sections. Also: RowCount is usefull.


--
Hope this helps,

Chris Roth
Visio MVP
 

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