Table of contents
Collapse the table of content
Expand the table of content

Selection.FitCurve Method (Visio)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

Reduces the number of geometry segments in a shape or shapes by replacing them with similar spline, arc, and line segments that approximate the paths of the initial segments. Typically, this reduces the number of segments in the shape.


expression . FitCurve( Tolerance , Flags )

expression A variable that represents a Selection object.


NameRequired/OptionalData TypeDescription
ToleranceRequiredDoubleHow closely the resulting paths must match the shape's original paths.
FlagsRequiredIntegerFlags that influence how the shape is drawn.

Return Value



The FitCurve method of a Selection object optimizes each of the shapes in the selection. It does not combine the selected shapes into a single shape.

The paths resulting from the FitCurve method fall within the given tolerance of the initial paths. Tolerance should be in internal drawing units (inches). To match the initial paths exactly, specify a tolerance of zero (0).

The Flags argument is a bitmask that specifies options for optimizing the paths. Its value should either be zero or a combination of one or more of the following values.

**Constant ****Value ****Description **
visSplinePeriodic&;H1Produce periodic splines if appropriate.
visSplineDoCircles&;H2Recognize circular segments in the shape(s) and generate circular arcs instead of spline rows for those segments.
visSplineAbrupt&;H4Break the resulting splines whenever an abrupt change of direction or curvature in a path is detected.
© 2018 Microsoft