View Single Post
Old 09-08-2014, 17:04
nic nic is offline
Join Date: May 2009
Posts: 90
Default Excel test file and code that fails

This is code that the code as it was when I gave up trying and attached small excel sheet that will work with it.

If theres a good place to look for Node info could somebody point me in the right direction.

Dim sShape As Shape
Dim crv As Curve
Dim sp As SubPath
Dim ro1st As Double
Dim roFin As Double
Dim x As Double, y As Double, r As Double, n As Double
Dim nd As Node

Set XL = GetObject(, "Excel.Application")

x = XL.Cells(1, 1).Value
y = XL.Cells(1, 2).Value

Set crv = CreateCurve(ActiveDocument)
Set sp = crv.CreateSubPath(x, y)

For n = 2 To 22
    x = XL.Cells(n, 1).Value
    y = XL.Cells(n, 2).Value
    sp.AppendCurveSegment x, y
Next n

sp.Closed = False

Set sShape = ActiveLayer.CreateCurve(crv)

' above draw a shape but below fails
For Each nd In sShape
    nd.Type = cdrSmoothNode
Next nd

End Sub
Attached Files
File Type: zip excel (4.0 KB, 383 views)
Reply With Quote