<?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: Get Line Object Length in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/get-line-object-length/m-p/3247574#M58137</link>
    <description>Is this code correct? FP = AcL.StartPoint : SP = AcL.EndPoint Dim dx As Double = SP.X - FP.X Dim dy As Double = SP.Y - FP.Y Dim len As Double = Math.Sqrt((dx * dx) + (dy * dy))</description>
    <pubDate>Fri, 02 Dec 2011 11:32:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-12-02T11:32:30Z</dc:date>
    <item>
      <title>Get Line Object Length</title>
      <link>https://forums.autodesk.com/t5/net-forum/get-line-object-length/m-p/3247544#M58136</link>
      <description>&lt;PRE&gt;Dim acDoc As Document = Application.DocumentManager.MdiActiveDocument

        Dim acCurDb As Database = acDoc.Database
        ed = acDoc.Editor

        Using acTrans = acCurDb.TransactionManager.StartTransaction()

            Dim acSSPrompt As PromptSelectionResult = acDoc.Editor.GetSelection()
            If acSSPrompt.Status = PromptStatus.OK Then

                acSSet = acSSPrompt.Value

                For Each acSSObj As SelectedObject In acSSet
                    If Not IsDBNull(acSSObj) Then
                        Dim acEnt As Entity = acTrans.GetObject(acSSObj.ObjectId, OpenMode.ForWrite)

                        If Not IsDBNull(acEnt) Then

                            If TypeOf acEnt Is Line Then
                                Dim AcL As Line
                                AcL = acEnt

                                MsgBox(AcL.Area)
                               
                            End If
                        End If
                    End If
                Next
            End If
           
        End Using&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I need to get the line object length. i Have written the below code.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;If i use area property i am getting zero.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me from this issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THank you.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2011 11:00:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/get-line-object-length/m-p/3247544#M58136</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-02T11:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: Get Line Object Length</title>
      <link>https://forums.autodesk.com/t5/net-forum/get-line-object-length/m-p/3247574#M58137</link>
      <description>Is this code correct? FP = AcL.StartPoint : SP = AcL.EndPoint Dim dx As Double = SP.X - FP.X Dim dy As Double = SP.Y - FP.Y Dim len As Double = Math.Sqrt((dx * dx) + (dy * dy))</description>
      <pubDate>Fri, 02 Dec 2011 11:32:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/get-line-object-length/m-p/3247574#M58137</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-02T11:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: Get Line Object Length</title>
      <link>https://forums.autodesk.com/t5/net-forum/get-line-object-length/m-p/3247578#M58138</link>
      <description>&lt;PRE&gt;AcL.GetDistanceAtParameter(AcL.EndParam)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2011 11:35:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/get-line-object-length/m-p/3247578#M58138</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2011-12-02T11:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: Get Line Object Length</title>
      <link>https://forums.autodesk.com/t5/net-forum/get-line-object-length/m-p/3248726#M58139</link>
      <description>&lt;P&gt;If its just for a line, you can simply use the Length property. Or the Delta property&amp;nbsp;if you want the length as a vector.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2011 22:53:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/get-line-object-length/m-p/3248726#M58139</guid>
      <dc:creator>StephenPreston</dc:creator>
      <dc:date>2011-12-02T22:53:58Z</dc:date>
    </item>
  </channel>
</rss>

