Need help with annotation position

Started by ziko, April 28, 2010, 02:15:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ziko

Hello,
using automation, I am displaying an annotation when the user selects a shape. The annotation is an "Oval callout" from the ANNOT_U.VSS stencil. The balloon pops up displays the information to the user, but the problem is:
1- positioning this annotation and bind it, glue to connection point of the shape the user selected.
2- if the shape is on the top or the right of the page the annotation is going outside the scope of the page because it always displays on the top-right of the shape. How can I change it programmatically to display on the underneath the shape if the shape is on the top of the page or on the left of the shape if the shape is on the right of the page?

Any help is very much appreciated,
Ziko

ziko

I actually solved #1:
Call lAnnotation.CellsU("BeginX").GlueTo(lShape.CellsU("PinX"))

but for #2 if I can get the page width and height I can do the calculations to see if the lShape.PinX is close to the top or to the right so I can drop my lAnnotation in a position less than the Xpos or Ypos.
Thank You,
Ziko

Jumpy

Hello,
try sth. like this:


Sub Test()
Dim pg As Visio.Page
Dim Width As Double

Set pg = ActivePage

Width = pg.PageSheet.Cells("PageWidth").Result("MM")

End Sub