<?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: how to  get the coordinates of  acdb2dpolyline in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/how-to-get-the-coordinates-of-acdb2dpolyline/m-p/7270194#M30389</link>
    <description>&lt;P&gt;Maybe it works &amp;nbsp;in lisp But &amp;nbsp;not &amp;nbsp;work in C#+ AutoCAD com&lt;/P&gt;</description>
    <pubDate>Wed, 02 Aug 2017 05:19:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-08-02T05:19:22Z</dc:date>
    <item>
      <title>how to  get the coordinates of  acdb2dpolyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-get-the-coordinates-of-acdb2dpolyline/m-p/7267187#M30383</link>
      <description>&lt;P&gt;how to &amp;nbsp;get the coordinates of &amp;nbsp;acdb2dpolyline? I &amp;nbsp;setup &amp;nbsp;a project with C# and "com", the code like this&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;using System;&lt;BR /&gt;using System.Collections.Generic;&lt;BR /&gt;using System.Linq;&lt;BR /&gt;using System.Text;&lt;BR /&gt;using Autodesk.AutoCAD.Interop;&lt;BR /&gt;using Autodesk.AutoCAD.Interop.Common;&lt;BR /&gt;.......&lt;BR /&gt;&lt;BR /&gt;foreach (AcadObject acadObj in mySelectionSet)
                {

               if (acadObj.ObjectName == "AcDbPolyline")
                    {
                        AcadLWPolyline polyline = (AcadLWPolyline)acadObj;
                        double[] polylineCoords = (double[])polyline.Coordinates;
                        
                    }
                    else if (acadObj.ObjectName == "AcDb2dPolyline")
                    {
                        //**********  how to get the coordiates of  this  type
                    }



}&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Aug 2017 01:24:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-get-the-coordinates-of-acdb2dpolyline/m-p/7267187#M30383</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-01T01:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to  get the coordinates of  acdb2dpolyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-get-the-coordinates-of-acdb2dpolyline/m-p/7267398#M30384</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The AcDb2dPolyline also have a Coordinates property which return an array of type: [x0, y0, z0, x1, y1, z1, x2, y2, z2, ...]&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2017 04:45:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-get-the-coordinates-of-acdb2dpolyline/m-p/7267398#M30384</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2017-08-01T04:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to  get the coordinates of  acdb2dpolyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-get-the-coordinates-of-acdb2dpolyline/m-p/7267419#M30385</link>
      <description>&lt;P&gt;how to get the coordinates? by c#&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2017 05:18:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-get-the-coordinates-of-acdb2dpolyline/m-p/7267419#M30385</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-01T05:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to  get the coordinates of  acdb2dpolyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-get-the-coordinates-of-acdb2dpolyline/m-p/7267806#M30386</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;&lt;P&gt;how to &amp;nbsp;get the coordinates of &amp;nbsp;acdb2dpolyline? I &amp;nbsp;setup &amp;nbsp;a project with C# and "com", the code like this&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;using System;&lt;BR /&gt;using System.Collections.Generic;&lt;BR /&gt;using System.Linq;&lt;BR /&gt;using System.Text;&lt;BR /&gt;using Autodesk.AutoCAD.Interop;&lt;BR /&gt;using Autodesk.AutoCAD.Interop.Common;&lt;BR /&gt;.......&lt;BR /&gt;&lt;BR /&gt;foreach (AcadObject acadObj in mySelectionSet)
                {

               if (acadObj.ObjectName == "AcDbPolyline")
                    {
                        AcadLWPolyline polyline = (AcadLWPolyline)acadObj;
                        double[] polylineCoords = (double[])polyline.Coordinates;
                        
                    }
                    else if (acadObj.ObjectName == "AcDb2dPolyline")
                    {
                        //**********  how to get the coordiates of  this  type
                    }



}&lt;/PRE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You can cast the AcadObject to an &lt;STRONG&gt;AcadPolyline&lt;/STRONG&gt; and read its &lt;EM&gt;Coordinates&lt;/EM&gt; property the same way you do with AcadLWPolyline.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2017 09:10:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-get-the-coordinates-of-acdb2dpolyline/m-p/7267806#M30386</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2017-08-01T09:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to  get the coordinates of  acdb2dpolyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-get-the-coordinates-of-acdb2dpolyline/m-p/7269946#M30387</link>
      <description>&lt;P&gt;thank &amp;nbsp;you ,I set the code &amp;nbsp;like this&lt;/P&gt;&lt;PRE&gt;using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Autodesk.AutoCAD.Interop;
using Autodesk.AutoCAD.Interop.Common;
.......

foreach (AcadObject acadObj in mySelectionSet)
                {

               if (acadObj.ObjectName == "AcDbPolyline")
                    {
                        AcadLWPolyline polyline = (AcadLWPolyline)acadObj;
                        double[] polylineCoords = (double[])polyline.Coordinates;
                        
                    }
                    else if (acadObj.ObjectName == "AcDb2dPolyline")
                    {
                        //**********  how to get the coordiates of  this  type
                        AcadPolyline line=(AcadPolyline)acadObj;
                       double[]  polylineCoords=(double[])line.Coordinates;
                       
                    }



}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp; THE &amp;nbsp;polylineCoords.length is 0; &amp;nbsp;I &amp;nbsp;can't &amp;nbsp;get coordinates &amp;nbsp;with this method!!! &amp;nbsp;is there other &amp;nbsp;way?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 00:38:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-get-the-coordinates-of-acdb2dpolyline/m-p/7269946#M30387</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-02T00:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: how to  get the coordinates of  acdb2dpolyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-get-the-coordinates-of-acdb2dpolyline/m-p/7270153#M30388</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;&lt;P&gt;&amp;nbsp; THE &amp;nbsp;polylineCoords.length is 0; &amp;nbsp;I &amp;nbsp;can't &amp;nbsp;get coordinates &amp;nbsp;with this method!!! &amp;nbsp;is there other &amp;nbsp;way?&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The Coordinates property works for me&amp;nbsp;(tested from LISP). I'm not sure what it could be.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 04:14:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-get-the-coordinates-of-acdb2dpolyline/m-p/7270153#M30388</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2017-08-02T04:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to  get the coordinates of  acdb2dpolyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-get-the-coordinates-of-acdb2dpolyline/m-p/7270194#M30389</link>
      <description>&lt;P&gt;Maybe it works &amp;nbsp;in lisp But &amp;nbsp;not &amp;nbsp;work in C#+ AutoCAD com&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 05:19:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-get-the-coordinates-of-acdb2dpolyline/m-p/7270194#M30389</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-02T05:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to  get the coordinates of  acdb2dpolyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-get-the-coordinates-of-acdb2dpolyline/m-p/7272201#M30390</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;&lt;P&gt;Maybe it works &amp;nbsp;in lisp But &amp;nbsp;not &amp;nbsp;work in C#+ AutoCAD com&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You should try testing it with LISP or VBA to rule out a problem with the COM API on that system.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 18:35:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-get-the-coordinates-of-acdb2dpolyline/m-p/7272201#M30390</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2017-08-02T18:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to  get the coordinates of  acdb2dpolyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-get-the-coordinates-of-acdb2dpolyline/m-p/7272914#M30391</link>
      <description>&lt;P&gt;i am sure that &amp;nbsp;it &amp;nbsp;work fine with LISP ,But &amp;nbsp;not work &amp;nbsp;with &amp;nbsp;COM. &amp;nbsp;this &amp;nbsp;data &amp;nbsp;type &amp;nbsp;is not support &amp;nbsp;in &amp;nbsp;com api?&lt;/P&gt;&lt;P&gt;can you &amp;nbsp;tell me &amp;nbsp;the &amp;nbsp;email &amp;nbsp;of &amp;nbsp;AutoCAD &amp;nbsp;&amp;nbsp;technology support&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2017 00:38:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-get-the-coordinates-of-acdb2dpolyline/m-p/7272914#M30391</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-03T00:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: how to  get the coordinates of  acdb2dpolyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-get-the-coordinates-of-acdb2dpolyline/m-p/7273144#M30392</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;AutoCAD COM API works the same whatever the language you use (Visual LISP, VBA, C#, ...).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This works for me:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;if (acadObj.ObjectName == "AcDb2dPolyline")
{
    AcadPolyline polyline2d = (AcadPolyline)acadObj;
    double[] polylineCoords = (double[])polyline2d.Coordinates;
}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2017 05:09:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-get-the-coordinates-of-acdb2dpolyline/m-p/7273144#M30392</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2017-08-03T05:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: how to  get the coordinates of  acdb2dpolyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-get-the-coordinates-of-acdb2dpolyline/m-p/7273236#M30393</link>
      <description>&lt;P&gt;&amp;nbsp;HI _gile,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;!-- StartFragment  --&gt;&amp;nbsp;I use the C#&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;language and&amp;nbsp;AutoCAD 2010 &amp;nbsp;COM API,the same code does't work !&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;can you send me the project ? or &amp;nbsp;I &amp;nbsp;send you &amp;nbsp;the dwg &amp;nbsp;file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;my &amp;nbsp;Email is&amp;nbsp;yyjpz2007@163.com&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2017 06:01:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-get-the-coordinates-of-acdb2dpolyline/m-p/7273236#M30393</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-03T06:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: how to  get the coordinates of  acdb2dpolyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-get-the-coordinates-of-acdb2dpolyline/m-p/7274882#M30394</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;&lt;P&gt;&amp;nbsp;HI _gile,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;!--  StartFragment   --&gt;&amp;nbsp;I use the C#&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;language and&amp;nbsp;AutoCAD 2010 &amp;nbsp;COM API,the same code does't work !&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;can you send me the project ? or &amp;nbsp;I &amp;nbsp;send you &amp;nbsp;the dwg &amp;nbsp;file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;my &amp;nbsp;Email is&amp;nbsp;yyjpz2007@163.com&lt;/SPAN&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Again, the problem is local (there may be problems with COM on that system).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first step is to verify that by using another language (LISP or VBA) and see if the problem also occurs there.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2017 17:21:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-get-the-coordinates-of-acdb2dpolyline/m-p/7274882#M30394</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2017-08-03T17:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to  get the coordinates of  acdb2dpolyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-get-the-coordinates-of-acdb2dpolyline/m-p/11902284#M30395</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp;&lt;BR /&gt;The following solution works for me&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Polyline2d simplePolyline2D = (Polyline2d)acdb2dpolyline.GetTransformedCopy(Matrix3d.Scaling(1, new Point3d(0,0,0)));
simplePolyline2D.ConvertToPolyType(Poly2dType.SimplePoly);

foreach (Vertex2d v in simplePolyline2D) 
{
    v.Position; // that is a Point3D
}&amp;nbsp;&lt;/LI-CODE&gt;&lt;P&gt;The reason of use the GetTransformedCopy() method is just to avoid errors in AutoCAD during ConvertToPolyType() execution if you get this entity in read mode. So, you are working with a copy of the object and do not directly edit it.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2023 17:39:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-get-the-coordinates-of-acdb2dpolyline/m-p/11902284#M30395</guid>
      <dc:creator>hennadii_k</dc:creator>
      <dc:date>2023-04-17T17:39:25Z</dc:date>
    </item>
  </channel>
</rss>

