Tags: cells, microsoft, msdn, pin, position, shprectobj, software, visio, width

Pin Position....

On Microsoft » Microsoft Visio

5,348 words with 5 Comments; publish: Tue, 03 Jun 2008 22:20:00 GMT; (30062.50, « »)

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.

All Comments

Leave a comment...

  • 5 Comments
    • On Mon, 6 Mar 2006 12:15:34 -0800, Joe <Joe.ms-visio.questionfor.info.discussions.microsoft.com>

      wrote:

      >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

      Regards, Paul Herber, Sandrila Ltd. http://www.pherber.com/

      Electronics for Visio http://www.electronics.sandrila.co.uk/

      #1; Tue, 03 Jun 2008 22:21:00 GMT
    • 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.

      "Paul Herber" wrote:

      > On Mon, 6 Mar 2006 12:15:34 -0800, Joe <Joe.ms-visio.questionfor.info.discussions.microsoft.com>

      > wrote:

      >

      > PinX

      > PinY

      > --

      > Regards, Paul Herber, Sandrila Ltd. http://www.pherber.com/

      > Electronics for Visio http://www.electronics.sandrila.co.uk/

      >

      #2; Tue, 03 Jun 2008 22:22:00 GMT
    • In that case have a look at

      LocPinX

      LocPinY

      On Mon, 6 Mar 2006 12:50:30 -0800, Joe <Joe.ms-visio.questionfor.info.discussions.microsoft.com>

      wrote:

      [vbcol=seagreen]

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

      >"Paul Herber" wrote:

      Regards, Paul Herber, Sandrila Ltd. http://www.pherber.com/

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

      #3; Tue, 03 Jun 2008 22:23:00 GMT
    • Hi Joe,

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

      "PinY".

      Best regards,

      Markus

      "Joe" <Joe.ms-visio.questionfor.info.discussions.microsoft.com> schrieb im Newsbeitrag

      news:C728509E-D9CD-49B7-99CE-9F98D31C574B.ms-visio.questionfor.info.microsoft.com...

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

      #4; Tue, 03 Jun 2008 22:24:00 GMT
    • 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

      "Markus Breugst" <markus.breugst__AT__gedilan-consulting.de> wrote in

      message news:O5W7d3bQGHA.1328.ms-visio.questionfor.info.TK2MSFTNGP10.phx.gbl...

      > Hi Joe,

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

      > and "PinY".

      > Best regards,

      > Markus

      > "Joe" <Joe.ms-visio.questionfor.info.discussions.microsoft.com> schrieb im Newsbeitrag

      > news:C728509E-D9CD-49B7-99CE-9F98D31C574B.ms-visio.questionfor.info.microsoft.com...

      >

      #5; Tue, 03 Jun 2008 22:25:00 GMT