Cell.GlueToPos Method
Visio Automation Reference |
Glues one shape to another from a cell in the first shape to an x,y position in the second shape.
Version Information
Version Added: Visio 2.0
Syntax
expression.GlueToPos(SheetObject, xPercent, yPercent)
expression A variable that represents a Cell object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
SheetObject | Required | [IVSHAPE] | An expression that returns the Shape object to be glued to. |
xPercent | Required | Double | The x-coordinate of the position to glue to. |
yPercent | Required | Double | The y-coordinate of the position to glue to. |
Return Value
Nothing
Remarks
The GlueToPos method creates a new connection point at the location determined by xPercent and yPercent, which represent decimal fractions of the specified shape's width and height, respectively, rather than coordinates. For example, the following creates a connection point at the center of SheetObject and glues the part of the shape that cellObject represents to that point:
cellObject.GlueToPos SheetObject, 0.5, 0.5
Gluing the X cell of a Controls section row or a BeginX or EndX cell automatically glues the Y cell of the Controls section row or the BeginY or EndY cell, respectively. (The reverse is also true.)
Example
The following example shows how to use the GlueToPos method to glue shapes together.
Visual Basic for Applications |
---|
|
See Also