API Documentation > CorelDRAW > 2025-v26 > Application > IVGApplication
Application.CreateCurve method
Creates an instance of Curve object and optionally binds it to a document
Syntax:
Function CreateCurve(Optional ByVal Document As Document = Nothing) As Curve
Parameters:
Name Type Description
Document
Specifies the settings to apply
Remarks:
The CreateCurve method creates a curve in memory and optionally binds it to a document. Any changes made to the curve in memory do not affect the document, and are, therefore, performed very fast. When you work with coordinates (for example, setting the position of a node, getting the length of a curve, and so on), it is important to know which document to reference. You can attach a curve in memory to a document to use that document's system of measurement. This can be done by specifying the optional Document parameter in the CreateCurve method, or by using the Curve.BindToDocument method.
Examples:
The following VBA example creates a curve on the active layer using the settings of the active document.
Sub Test()
Dim crv As Curve
Dim s As Shape
Dim sp As SubPath
Set crv = Application.CreateCurve(ActiveDocument)
Set sp = crv.CreateSubPath(1, 5)
sp.AppendLineSegment 2, 0
sp.AppendCurveSegment2 5, 7, 6, 6, 3, 5
sp.AppendCurveSegment2 7, 2, 3, 6, 7, 1
sp.AppendLineSegment 9, 6
sp.Nodes(3).Type = cdrSmoothNode
Set s = ActiveLayer.CreateCurve(crv) 
End Sub You can also use the New keyword to create a curve in memory. Dim crv As Curve Set crv = New Curve