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

Page.DrawNURBS Method (Visio)

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

Creates a new shape whose path consists of a single NURBS (nonuniform rational B-spline) segment.


expression . DrawNURBS( degree , Flags , xyArray() , knots() , weights )

expression A variable that represents a Page object.


NameRequired/OptionalData TypeDescription
degreeRequiredIntegerThe spline's degree; an integer between 1 and 25.
FlagsRequiredIntegerFlags that influence how the shape is drawn.
xyArray()RequiredDoubleAn array of alternating x and y values that define the control points coordinates; use internal drawing units (inches).
knots()RequiredDoubleAn array of knots.
weightsOptionalVariantAn array of weights.

Return Value



The DrawNURBS method creates a new shape whose path consists of a single NURBS segment as specified by the arguments.

The control points should be in internal drawing units (inches) with respect to the coordinate space of the page, master, or group in which the new shape is being created. The xyArray, knots, and weights arrays should be of type SAFEARRAY of 8-byte floating point values passed by reference (VT_R8|VT_ARRAY|VT_BYREF). This is how Microsoft Visual Basic passes arrays to Automation objects.

The knots argument is unit-less. The sequence of knots should be non-decreasing. In other words, knots( i + 1) < knots( i ) is not acceptable. knots( i + 1) = knots( i ) is permitted, and then the value is repeated, but the following restrictions apply:

  • The first knot may not be repeated more than degree + 1 times.

  • The last knot may not be repeated.

  • Any knot between the first and last may not be repeated more than degree times.

  • If the first knot is repeated less than degree + 1 times, the spline is periodic .

  • The list of weights is optional. Its absence signals that the spline is non-rational . Weights are unit-less.

The following rules apply to the sizes of the lists. For a spline with n control points:

  • If the spline is periodic, n > 2. Otherwise, n > degree.

  • The size of xyArray is 2 n .

  • The size of the weights array is n (if present).

  • The size of the knots array is n + 1.

The conventional non-periodic spline requires n + degree + 1 knots, but the application implies the repeated knots at the end. For example, the degree 2 knot list (0,0,0,2,5,8) is interpreted in the application as the conventional knot sequence (0,0,0,2,5,8,8,8).

The Flags parameter is a bitmask that specifies options for drawing the new shape. Its value should be either zero (0) or visSpline1D (8). If Flags is visSpline1D and if the first and last points in xyArray don't coincide, the DrawNURBS method produces a shape with one-dimensional (1-D) behavior; otherwise, it produces a shape with two-dimensional (2-D) behavior.

If the first and last points in xyArray do coincide, the DrawNURBS method produces a filled shape.

© 2018 Microsoft