<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Multiple polylines as separate entities in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/multiple-polylines-as-separate-entities/m-p/6830937#M33043</link>
    <description>&lt;P&gt;Ok, I'll have a look to see....... thank you .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;UPDATE:-&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many Thanks&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Les&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Starting to look messy though, maybe I need to break it into functions, but that another story &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here's the code to help other that might be doing similar.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;            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&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Jan 2017 18:53:29 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-01-25T18:53:29Z</dc:date>
    <item>
      <title>Multiple polylines as separate entities</title>
      <link>https://forums.autodesk.com/t5/net-forum/multiple-polylines-as-separate-entities/m-p/6828424#M33039</link>
      <description>&lt;P&gt;Hi People,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Is it possible to create several 3Dpolylines in one transaction without them being joined up? I'm attempting to do this in VB.NET&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've managed to put four start and and end co-ordinates in but they all join together.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It feels wrong to do them as seperate transactions.....but I've been wrong before &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All comments appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Les&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2017 20:57:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/multiple-polylines-as-separate-entities/m-p/6828424#M33039</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-24T20:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple polylines as separate entities</title>
      <link>https://forums.autodesk.com/t5/net-forum/multiple-polylines-as-separate-entities/m-p/6828462#M33040</link>
      <description>&lt;P&gt;Of course you can start a Transaction and add many Entities into database and commit the Transaction at once. Something like (Pseudo-code):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;using (var tran=TheDB.TransactionManager.StartTransaction())&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; var space=(BlockTableRecord)tran.GetObject(TheDb.CurrentSpaceId,OpenMode.ForWriet);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;//Assume you have a few sets of points for building polylines, each set is a Point3dCollection&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; for (Point3dCollection pointSet in MyPointsSets)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var poly=new Point3d(PolyLineType.SimplePoly, pointSet, true);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; poly.SetDatabaseDefault();&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Set other entity properties, if necessary&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; space.Append(poly);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tran.AddNewlyCreatedObject(poly, true);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; tran.Commit();&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you can see you can create as many entities in one transaction and only commit it once (well, you may not want to do hundreds of thousands at once, though).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Even you add one entity to database with each time opening a transaction/commit, you may not notice much different by doing for quite a few entities. It is certainly "OK", if not a best practice.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2017 21:17:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/multiple-polylines-as-separate-entities/m-p/6828462#M33040</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2017-01-24T21:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple polylines as separate entities</title>
      <link>https://forums.autodesk.com/t5/net-forum/multiple-polylines-as-separate-entities/m-p/6828527#M33041</link>
      <description>&lt;P&gt;Well... I'm using a 3D point collection....and appending each pair of co-ordinates for the polyline seperately but they all tend to join up?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;                ' Create 3D polylines ( points)

                Dim acPoly3d As Polyline3d = New Polyline3d()

                acPoly3d.SetDatabaseDefaults()

                'acPoly3d.ColorIndex = 5  'Blue
                'acPoly3d.Layer = 0

                ' Add the new polyline object to the block table record and the transaction
                acBlkTblRec.AppendEntity(acPoly3d)
                acTrans.AddNewlyCreatedDBObject(acPoly3d, 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)
                    acPoly3d.AppendVertex(acPolVer3d)
                    acTrans.AddNewlyCreatedDBObject(acPolVer3d, True)
                Next

                '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)
                    acPoly3d.AppendVertex(acPolVer3d)
                    acTrans.AddNewlyCreatedDBObject(acPolVer3d, True)
                Next
                '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)
                    acPoly3d.AppendVertex(acPolVer3d)
                    acTrans.AddNewlyCreatedDBObject(acPolVer3d, True)
                Next
                '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)
                    acPoly3d.AppendVertex(acPolVer3d)
                    acTrans.AddNewlyCreatedDBObject(acPolVer3d, True)
                Next

                ' Save the new objects to the database

                acTrans.Commit()

            End Using
        End If
        Me.Close()&lt;/PRE&gt;&lt;P&gt;Is it possible to get them as single lines without changing the type of line?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Les&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2017 21:46:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/multiple-polylines-as-separate-entities/m-p/6828527#M33041</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-24T21:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple polylines as separate entities</title>
      <link>https://forums.autodesk.com/t5/net-forum/multiple-polylines-as-separate-entities/m-p/6828750#M33042</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My code clearly shows to create multiple/individual polyline3d entities and add them into current space. However, your code CLEARLY only creates ONE polyline3d entity, and then your code keeps APPENDING vertices to the SAME/SINGLE polyline3d, thus you get what you want: SINGLE polyline3d is created.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want multiple polyline3d for each group of points, you need to create Polyline3d for each group of point, not append point to the only Polyline3d as vertex.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not sure what else I can say.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2017 23:07:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/multiple-polylines-as-separate-entities/m-p/6828750#M33042</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2017-01-24T23:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple polylines as separate entities</title>
      <link>https://forums.autodesk.com/t5/net-forum/multiple-polylines-as-separate-entities/m-p/6830937#M33043</link>
      <description>&lt;P&gt;Ok, I'll have a look to see....... thank you .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;UPDATE:-&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many Thanks&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Les&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Starting to look messy though, maybe I need to break it into functions, but that another story &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here's the code to help other that might be doing similar.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;            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&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2017 18:53:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/multiple-polylines-as-separate-entities/m-p/6830937#M33043</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-25T18:53:29Z</dc:date>
    </item>
  </channel>
</rss>

