Hi,
the code below takes the data from an array and draws a curved line through a set of x,y points. I would like to speed up that process and think doing it with a virtual layer would help but I can't get the syntax right. Where would i need to insert ActiveVirtualLayer and LogCreateShape?
Code:
Set crv = CreateCurve(ActiveDocument)
Set sp = crv.CreateSubPath(Data(1, 0), Data(1, 1))
'add curves to shape
For n = 2 To 2000
sp.AppendCurveSegment Data(n, 0), Data(n, 1)
Next n
sp.Closed = False
Set sShape = ActiveLayer.CreateCurve(crv)
and can the following be speeded up by smoothing all the nodes in one go rather than running through a loop?
Code:
'smooth nodes
Set nr = sShape.Curve.Nodes.All
For Each nd In nr
nd.Type = cdrSmoothNode
Next nd
Thanks
nic