Offset Method [Visio 2003 SDK Documentation]
Offsets a selection or shape a specified amount. Returns Nothing.
object .Offset(Distance)
object Required. An expression that returns a Selection or Shape object.
Distance Optional Double. Specifies the distance to offset the selection or shape.
Version added
2003
Remarks
Calling the Offset method is the equivalent of selecting the Offset command in the user interface (Shape menu, Operations submenu).
For a specified line or curve, the offset is implemented as a pair of lines or curves that are equidistant from the original line or curve. Offset shapes inherit line patterns from the original shapes. They do not inherit any fill patterns or text from the original shapes.
Example
This Microsoft Visual Basic for Applications (VBA) macro shows how to use the Offset method to offset a line shape by a specified amount.
Public Sub Offset_Example()
Dim vsoShape As Visio.Shape
Set vsoShape = Application.ActiveWindow.Page.DrawLine(3, 3, 6, 6)
ActiveWindow.DeselectAll
ActiveWindow.Select vsoShape, visSelect
vsoShape.Offset(2)
End Sub
Applies to | Selection object | Shape object