freeformbuilder

B

boyze

I'm a newbie trying to build a freeform shape by adding nodes via .addnodes
via a loop.

Something like:
'
Count = UBound(CoordArray, 1)
'
With myDocument.Shapes.BuildFreeform(msoEditingCorner, CoordArray(1, 1),
CoordArray(1, 2))
For counter = 1 To Count
.AddNodes msoSegmentLine, msoEditingAuto, CoordArray(counter, 1),
CoordArray(counter, 2)
Next counter

.ConvertToShape

End With


But it doesn't like this.
 
A

Andy Pope

Hi,

The problem is, assuming your CoordArray values are valid, the first value
in the for next loop is the same as the start point.
Try this,

For counter = 2 To Count

Cheers
Andy
 
B

boyze

Thanks. Worked like a charm.
--
X


Andy Pope said:
Hi,

The problem is, assuming your CoordArray values are valid, the first value
in the for next loop is the same as the start point.
Try this,

For counter = 2 To Count

Cheers
Andy
 
Top