<?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 C# .net command that extract area out of multiple closed polyline to a table IN SORTED ORDER in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/c-net-command-that-extract-area-out-of-multiple-closed-polyline/m-p/12558655#M5485</link>
    <description>&lt;P&gt;I know data extraction command exist but I cannot find a way to have the areas be sorted in any meaningful way other than biggest to smallest.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Possible solution 1: somehow assign some useful numbering system attribute for data extraction to reference from and sort.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Possible solution 2: use fields and reference the area of the polyline. I will manually sort and move the poly line in such a way that they can be sorted using their geometric center location. Then write a command that will write input field expressions in the table like&amp;nbsp;%&amp;lt;\AcObjProp Object(%&amp;lt;\_ObjId 2875408902560&amp;gt;%).Area \f "%lu2%pr1"&amp;gt;%&amp;nbsp; in the cell according to the location of each polyline.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;possible solution 3:(most ideal solution) I already have text in the center of the polyline and those text can help me sort the polylines. I can somehow extract the text position and the polyline's geometric center and match the two and then write it into the table similar to solution 2. Say if I wrote A2 as text then it will input the area in A2 of the cell. This would be most ideal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any ideas?&lt;/P&gt;</description>
    <pubDate>Tue, 13 Feb 2024 23:49:02 GMT</pubDate>
    <dc:creator>jeff.wangD95HG</dc:creator>
    <dc:date>2024-02-13T23:49:02Z</dc:date>
    <item>
      <title>C# .net command that extract area out of multiple closed polyline to a table IN SORTED ORDER</title>
      <link>https://forums.autodesk.com/t5/net-forum/c-net-command-that-extract-area-out-of-multiple-closed-polyline/m-p/12558655#M5485</link>
      <description>&lt;P&gt;I know data extraction command exist but I cannot find a way to have the areas be sorted in any meaningful way other than biggest to smallest.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Possible solution 1: somehow assign some useful numbering system attribute for data extraction to reference from and sort.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Possible solution 2: use fields and reference the area of the polyline. I will manually sort and move the poly line in such a way that they can be sorted using their geometric center location. Then write a command that will write input field expressions in the table like&amp;nbsp;%&amp;lt;\AcObjProp Object(%&amp;lt;\_ObjId 2875408902560&amp;gt;%).Area \f "%lu2%pr1"&amp;gt;%&amp;nbsp; in the cell according to the location of each polyline.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;possible solution 3:(most ideal solution) I already have text in the center of the polyline and those text can help me sort the polylines. I can somehow extract the text position and the polyline's geometric center and match the two and then write it into the table similar to solution 2. Say if I wrote A2 as text then it will input the area in A2 of the cell. This would be most ideal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any ideas?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 23:49:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/c-net-command-that-extract-area-out-of-multiple-closed-polyline/m-p/12558655#M5485</guid>
      <dc:creator>jeff.wangD95HG</dc:creator>
      <dc:date>2024-02-13T23:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: C# .net command that extract area out of multiple closed polyline to a table IN SORTED ORDER</title>
      <link>https://forums.autodesk.com/t5/net-forum/c-net-command-that-extract-area-out-of-multiple-closed-polyline/m-p/12558740#M5486</link>
      <description>&lt;P&gt;If you use a field that references the polyline's area, the field's definition implicitly references the polyline's ObjectId. Finding the associated field given the polyline isn't difficult, given all of the polylines and referencing fields.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12948469"&gt;@jeff.wangD95HG&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;I know data extraction command exist but I cannot find a way to have the areas be sorted in any meaningful way other than biggest to smallest.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Possible solution 1: somehow assign some useful numbering system attribute for data extraction to reference from and sort.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Possible solution 2: use fields and reference the area of the polyline. I will manually sort and move the poly line in such a way that they can be sorted using their geometric center location. Then write a command that will write input field expressions in the table like&amp;nbsp;%&amp;lt;\AcObjProp Object(%&amp;lt;\_ObjId 2875408902560&amp;gt;%).Area \f "%lu2%pr1"&amp;gt;%&amp;nbsp; in the cell according to the location of each polyline.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;possible solution 3:(most ideal solution) I already have text in the center of the polyline and those text can help me sort the polylines. I can somehow extract the text position and the polyline's geometric center and match the two and then write it into the table similar to solution 2. Say if I wrote A2 as text then it will input the area in A2 of the cell. This would be most ideal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any ideas?&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 00:14:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/c-net-command-that-extract-area-out-of-multiple-closed-polyline/m-p/12558740#M5486</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2024-02-14T00:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: C# .net command that extract area out of multiple closed polyline to a table IN SORTED ORDER</title>
      <link>https://forums.autodesk.com/t5/net-forum/c-net-command-that-extract-area-out-of-multiple-closed-polyline/m-p/12558912#M5487</link>
      <description>&lt;P&gt;well there are some steps I am stuck on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. prompt user to select multiple poly lines (check)&lt;/P&gt;&lt;P&gt;2. prompt user to select multiple text (check)&lt;/P&gt;&lt;P&gt;3. grab object ID from text and poly line&amp;nbsp;(check)&lt;/P&gt;&lt;P&gt;4. extract xyz coordinate from poly line object id ????????&lt;/P&gt;&lt;P&gt;5. extract xyz coordinate from text&amp;nbsp; objectid (check)&lt;/P&gt;&lt;P&gt;6. compute a sorting reference number using (x-y)/(x+y). lets call it NDVI.&amp;nbsp;&amp;nbsp;(check)&lt;/P&gt;&lt;P&gt;7.&amp;nbsp; create two list. one for objectID for text and the other for polyline and sort (either in descending or ascending doesn't matter)?????&lt;/P&gt;&lt;P&gt;8.iterate both sorted list at the same time and fill in the missing variables to the input field expressions and the correct cell on the table according to the text.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;%&amp;lt;\AcObjProp Object(%&amp;lt;\_ObjId 2875408902560&amp;gt;%).Area \f "%lu2%pr1"&amp;gt;% (check)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;step 6 is something I came up with as an easy solution to match objects with similar coordinates. Its not bug free and act on the assumption of one to one matching.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;step 7 I am not sure how to make a list and sort it (yes I have learned sorting in my Computer science classes) a way that makes the most sense also I am not sure how to compute NDVI and attach it to that ObjectID. I don't feel like its efficient to compute NDVI every time I need to compare for sort. Or do I make another two separate list for NDVI text and NDVI polyline in the exact same order as the list for text and polyline. So while sorting for NDVI text list also apply the same shuffle to text list.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if there is any steps I can optimize or help me figure out how to do the ???? steps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 03:24:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/c-net-command-that-extract-area-out-of-multiple-closed-polyline/m-p/12558912#M5487</guid>
      <dc:creator>jeff.wangD95HG</dc:creator>
      <dc:date>2024-02-14T03:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: C# .net command that extract area out of multiple closed polyline to a table IN SORTED ORDER</title>
      <link>https://forums.autodesk.com/t5/net-forum/c-net-command-that-extract-area-out-of-multiple-closed-polyline/m-p/12560670#M5488</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12948469"&gt;@jeff.wangD95HG&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;well there are some steps I am stuck on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;4. extract xyz coordinate from poly line object id ????????&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Polylines have many coordinates. If the text the user wants to associate with a polyline is contained inside the (closed) polyline, you would use &lt;A href="https://www.theswamp.org/index.php?PHPSESSID=6eb8e28967e81f07e597ec87e4942886&amp;amp;topic=43572.msg488632#msg488632" target="_blank" rel="noopener"&gt;containment testing&lt;/A&gt; to find out if the text (or it's insertion point) is contained in a polyline.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the question is, are you requiring the text to be inside the polyline it's associated with?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As far as creating multiple parallel arrays (one for Text ObjectId and another for Polyline ObjectId), why?&amp;nbsp; You can define a simple data structure or class that contains a reference to both a TEXT and POLYLINE along with whatever other relevant data is needed:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;public class Entry
{
    ObjectId Polyline {get;set}
    ObjectId Text {get;set}
    Point3d Point {get;set}
}&lt;/LI-CODE&gt;&lt;P&gt;You can then create a list of instances of a class like this, and just sort that using the Point3d as the sort key.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 19:42:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/c-net-command-that-extract-area-out-of-multiple-closed-polyline/m-p/12560670#M5488</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2024-02-14T19:42:47Z</dc:date>
    </item>
  </channel>
</rss>

