Jalen
2015-11-20, 08:32 PM
Background:
I receive a .dxf with points. These points are arrayed in x,y,& z coordinates. I have extracted the coordinates into collections and I am trying to draw a polyline using those coordinates as vertices. It is important that the z coordinate be included. All points differ in their x,y,z coordinates.
The collection is a collection of arrays (0 to 2).
This was my attempt to call vertices straight from the collection:
ThisDrawing.ActiveLayer = newLayer
Set pLineA = ThisDrawing.ModelSpace.Add3DPoly(pointCollA.Item(1), pointCollA.Item(2), pointCollA.Item(3), _
pointCollA.Item(4), pointCollA.Item(5), pointCollA.Item(6), _
pointCollA.Item(7), pointCollA.Item(8), pointCollA.Item(9), _
pointCollA.Item(10), pointCollA.Item(11), pointCollA.Item(12), _
pointCollA.Item(13), pointCollA.Item(14), pointCollA.Item(15), _
pointCollA.Item(16), pointCollA.Item(17), pointCollA.Item(18), _
pointCollA.Item(19), pointCollA.Item(20), pointCollA.Item(21), _
pointCollA.Item(22), pointCollA.Item(23), pointCollA.Item(24), _
pointCollA.Item(25))
ThisDrawing.ActiveLayer = newLayer1
Set pLineB = ThisDrawing.ModelSpace.Add3DPoly(pointCollB.Item(1), pointCollB.Item(2), pointCollB.Item(3), _
pointCollB.Item(4), pointCollB.Item(5), pointCollB.Item(6), _
pointCollB.Item(7), pointCollB.Item(8), pointCollB.Item(9), _
pointCollB.Item(10), pointCollB.Item(11), pointCollB.Item(12), _
pointCollB.Item(13), pointCollB.Item(14), pointCollB.Item(15), _
pointCollB.Item(16), pointCollB.Item(17), pointCollB.Item(18), _
pointCollB.Item(19), pointCollB.Item(20), pointCollB.Item(21), _
pointCollB.Item(22), pointCollB.Item(23), pointCollB.Item(24), _
pointCollB.Item(25))
Result is: Compile error: Wrong number of arguments or invalid property assignment.
Thank you for help!8)
I receive a .dxf with points. These points are arrayed in x,y,& z coordinates. I have extracted the coordinates into collections and I am trying to draw a polyline using those coordinates as vertices. It is important that the z coordinate be included. All points differ in their x,y,z coordinates.
The collection is a collection of arrays (0 to 2).
This was my attempt to call vertices straight from the collection:
ThisDrawing.ActiveLayer = newLayer
Set pLineA = ThisDrawing.ModelSpace.Add3DPoly(pointCollA.Item(1), pointCollA.Item(2), pointCollA.Item(3), _
pointCollA.Item(4), pointCollA.Item(5), pointCollA.Item(6), _
pointCollA.Item(7), pointCollA.Item(8), pointCollA.Item(9), _
pointCollA.Item(10), pointCollA.Item(11), pointCollA.Item(12), _
pointCollA.Item(13), pointCollA.Item(14), pointCollA.Item(15), _
pointCollA.Item(16), pointCollA.Item(17), pointCollA.Item(18), _
pointCollA.Item(19), pointCollA.Item(20), pointCollA.Item(21), _
pointCollA.Item(22), pointCollA.Item(23), pointCollA.Item(24), _
pointCollA.Item(25))
ThisDrawing.ActiveLayer = newLayer1
Set pLineB = ThisDrawing.ModelSpace.Add3DPoly(pointCollB.Item(1), pointCollB.Item(2), pointCollB.Item(3), _
pointCollB.Item(4), pointCollB.Item(5), pointCollB.Item(6), _
pointCollB.Item(7), pointCollB.Item(8), pointCollB.Item(9), _
pointCollB.Item(10), pointCollB.Item(11), pointCollB.Item(12), _
pointCollB.Item(13), pointCollB.Item(14), pointCollB.Item(15), _
pointCollB.Item(16), pointCollB.Item(17), pointCollB.Item(18), _
pointCollB.Item(19), pointCollB.Item(20), pointCollB.Item(21), _
pointCollB.Item(22), pointCollB.Item(23), pointCollB.Item(24), _
pointCollB.Item(25))
Result is: Compile error: Wrong number of arguments or invalid property assignment.
Thank you for help!8)