Ok, I'll have a look to see....... thank you .
UPDATE:-
That worked a treat. As suggested I added a polyline for each set of points and THEN added the vertices. Did it for each polyline.
Many Thanks
Regards
Les
Starting to look messy though, maybe I need to break it into functions, but that another story 😄
Here's the code to help other that might be doing similar.
Using acTrans As Transaction = acCurDb.TransactionManager.StartTransaction()
' Open the Block TABLE for read
Dim acBlkTbl As BlockTable
acBlkTbl = acTrans.GetObject(acCurDb.BlockTableId, OpenMode.ForRead)
' Open the Blocktable RECORD in Model space for write
Dim acBlkTblRec As BlockTableRecord
acBlkTblRec = acTrans.GetObject(acBlkTbl(BlockTableRecord.ModelSpace), OpenMode.ForWrite)
' Create arc Co-ords...
Dim acArc1 As Arc = New Arc(New Point3d(douBP_PointXA2, (douBP_PointYA3), 0),
dou_BP_Radius, douBP_RadStartAngle1, douBP_RadEndAngle1) ' In Radians
acBlkTblRec.AppendEntity(acArc1)
acTrans.AddNewlyCreatedDBObject(acArc1, True)
Dim acArc2 As Arc = New Arc(New Point3d(douBP_PointXA5, douBP_PointYA4, 0),
dou_BP_Radius, douBP_RadStartAngle2, douBP_RadEndAngle2) ' In Radians
acBlkTblRec.AppendEntity(acArc2)
acTrans.AddNewlyCreatedDBObject(acArc2, True)
Dim acArc3 As Arc = New Arc(New Point3d(douBP_PointXA6, (douBP_PointYA7), 0),
dou_BP_Radius, douBP_RadStartAngle3, douBP_RadEndAngle3) ' In Radians
acBlkTblRec.AppendEntity(acArc3)
acTrans.AddNewlyCreatedDBObject(acArc3, True)
Dim acArc4 As Arc = New Arc(New Point3d(douBP_PointXA1, douBP_PointYA8, 0),
dou_BP_Radius, douBP_RadStartAngle4, douBP_RadEndAngle4) ' In Radians
acBlkTblRec.AppendEntity(acArc4)
acTrans.AddNewlyCreatedDBObject(acArc4, True)
' Create 3D polylines
Dim acPoly3d1 As Polyline3d = New Polyline3d()
acPoly3d1.SetDatabaseDefaults()
'acPoly3d.ColorIndex = 5 'Blue
'acPoly3d.Layer = 0
' Add the new polyline object to the block table record and the transaction
acBlkTblRec.AppendEntity(acPoly3d1)
acTrans.AddNewlyCreatedDBObject(acPoly3d1, True)
' Before adding vertexes, the polyline must be in the drawing
'Create a pts collection
Dim acPts3dPoly1 As Point3dCollection = New Point3dCollection()
acPts3dPoly1.Add(New Point3d(douBP_PointXA1, douBP_PointYA1, 0)) 'Start of first line
acPts3dPoly1.Add(New Point3d(douBP_PointXA2, douBP_PointYA2, 0)) 'End of first line
'Add vertices
For Each acPt3d As Point3d In acPts3dPoly1
Dim acPolVer3d As PolylineVertex3d = New PolylineVertex3d(acPt3d)
acPoly3d1.AppendVertex(acPolVer3d)
acTrans.AddNewlyCreatedDBObject(acPolVer3d, True)
Next
Dim acPoly3d2 As Polyline3d = New Polyline3d()
acPoly3d2.SetDatabaseDefaults()
'acPoly3d.ColorIndex = 5 'Blue
'acPoly3d.Layer = 0
' Add the new polyline object to the block table record and the transaction
acBlkTblRec.AppendEntity(acPoly3d2)
acTrans.AddNewlyCreatedDBObject(acPoly3d2, True)
'Create a pts collection
Dim acPts3dPoly2 As Point3dCollection = New Point3dCollection()
acPts3dPoly2.Add(New Point3d(douBP_PointXA3, douBP_PointYA3, 0)) 'Start of second line
acPts3dPoly2.Add(New Point3d(douBP_PointXA4, douBP_PointYA4, 0)) 'End of second line
'Add vertices
For Each acPt3d As Point3d In acPts3dPoly2
Dim acPolVer3d As PolylineVertex3d = New PolylineVertex3d(acPt3d)
acPoly3d2.AppendVertex(acPolVer3d)
acTrans.AddNewlyCreatedDBObject(acPolVer3d, True)
Next
Dim acPoly3d3 As Polyline3d = New Polyline3d()
acPoly3d3.SetDatabaseDefaults()
'acPoly3d.ColorIndex = 5 'Blue
'acPoly3d.Layer = 0
' Add the new polyline object to the block table record and the transaction
acBlkTblRec.AppendEntity(acPoly3d3)
acTrans.AddNewlyCreatedDBObject(acPoly3d3, True)
'Create a pts collection
Dim acPts3dPoly3 As Point3dCollection = New Point3dCollection()
acPts3dPoly3.Add(New Point3d(douBP_PointXA5, douBP_PointYA5, 0)) 'Start of second line
acPts3dPoly3.Add(New Point3d(douBP_PointXA6, douBP_PointYA6, 0)) 'End of second line
'Add vertices
For Each acPt3d As Point3d In acPts3dPoly3
Dim acPolVer3d As PolylineVertex3d = New PolylineVertex3d(acPt3d)
acPoly3d3.AppendVertex(acPolVer3d)
acTrans.AddNewlyCreatedDBObject(acPolVer3d, True)
Next
Dim acPoly3d4 As Polyline3d = New Polyline3d()
acPoly3d4.SetDatabaseDefaults()
'acPoly3d.ColorIndex = 5 'Blue
'acPoly3d.Layer = 0
' Add the new polyline object to the block table record and the transaction
acBlkTblRec.AppendEntity(acPoly3d4)
acTrans.AddNewlyCreatedDBObject(acPoly3d4, True)
'Create a pts collection
Dim acPts3dPoly4 As Point3dCollection = New Point3dCollection()
acPts3dPoly4.Add(New Point3d(douBP_PointXA7, douBP_PointYA7, 0)) 'Start of second line
acPts3dPoly4.Add(New Point3d(douBP_PointXA8, douBP_PointYA8, 0)) 'End of second line
'Add vertices
For Each acPt3d As Point3d In acPts3dPoly4
Dim acPolVer3d As PolylineVertex3d = New PolylineVertex3d(acPt3d)
acPoly3d4.AppendVertex(acPolVer3d)
acTrans.AddNewlyCreatedDBObject(acPolVer3d, True)
Next
' Save the new objects to the database
acTrans.Commit()
End Using