<?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: Reading objacts location (X Y) in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/reading-objacts-location-x-y/m-p/3047572#M60631</link>
    <description>&lt;P&gt;Have a look at some of the .net training material and samples here&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A target="_self" href="http://http://usa.autodesk.com/adsk/servlet/index?id=1911627&amp;amp;siteID=123112"&gt;http://http://usa.autodesk.com/adsk/servlet/index?id=1911627&amp;amp;siteID=123112&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jun 2011 07:56:34 GMT</pubDate>
    <dc:creator>jamierobertson1</dc:creator>
    <dc:date>2011-06-06T07:56:34Z</dc:date>
    <item>
      <title>Reading objacts location (X Y)</title>
      <link>https://forums.autodesk.com/t5/net-forum/reading-objacts-location-x-y/m-p/3047022#M60624</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; color: #000000;"&gt;hi, a noob quation:&lt;BR /&gt;&lt;BR /&gt;i want to write a command in C# that alow user to do 2 things:&lt;BR /&gt;1. choose a layer to work on&lt;BR /&gt;2. make a list/table of all objects in that layer, and their X Y coordinates.&lt;BR /&gt;&lt;BR /&gt;for example - if a DWG file contain few layers, one of them has names (and only names). there are ~1500 objacts (text type) in that layer. every objact have a string (100,101,...,1350,1351...) and locating (X and Y). I want to be able to pick this layer, then bild a text file like this: (name X Y)&lt;BR /&gt;100 20456 40789&lt;BR /&gt;101 20344 40348&lt;BR /&gt;102 21034 40456&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;&lt;BR /&gt;its dont has to be sorted. how do I do it? can you give me the solution or any lift to proggress?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jun 2011 12:38:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/reading-objacts-location-x-y/m-p/3047022#M60624</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-04T12:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: Reading objacts location (X Y)</title>
      <link>https://forums.autodesk.com/t5/net-forum/reading-objacts-location-x-y/m-p/3047188#M60625</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you sure you need an application to do that?, i think that is a good task for the dataextraction command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-gnb&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jun 2011 00:45:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/reading-objacts-location-x-y/m-p/3047188#M60625</guid>
      <dc:creator>hgasty1001</dc:creator>
      <dc:date>2011-06-05T00:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: Reading objacts location (X Y)</title>
      <link>https://forums.autodesk.com/t5/net-forum/reading-objacts-location-x-y/m-p/3047220#M60626</link>
      <description>thanks for your answer. My aim is to create a data stracture that holds all this info, for calculations and so. In the far end, I want it to be an auto script that bild that proccesed text file.&lt;BR /&gt;&lt;BR /&gt;For start, how do I read the atributs of an entity? How do I choose a layer, and read every object from it?&lt;BR /&gt;&lt;BR /&gt;Thanks, EATTEXT will help me for now, and I do wait for your help to continue.</description>
      <pubDate>Sun, 05 Jun 2011 04:07:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/reading-objacts-location-x-y/m-p/3047220#M60626</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-05T04:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Reading objacts location (X Y)</title>
      <link>https://forums.autodesk.com/t5/net-forum/reading-objacts-location-x-y/m-p/3047300#M60627</link>
      <description>&lt;P&gt;You can quite get the objectIDs of all text on a layer passing a SelectionFilter to the Editor.selectAll method::&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;TypedValue[] tv = new TypedValue[] {new TypedValue((int)DxfCode.Start, "TEXT"), new TypedValue((int)DxfCode.LayerName, "Layer 1")};

SelectionFilter sf = new SelectionFilter(tv);
SelectionSet set = ed.SelectAll(sf).Value;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;You can then open the text entities from the objectIDs in the selectionSet and then access their properties.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jun 2011 14:20:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/reading-objacts-location-x-y/m-p/3047300#M60627</guid>
      <dc:creator>jamierobertson1</dc:creator>
      <dc:date>2011-06-05T14:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: Reading objacts location (X Y)</title>
      <link>https://forums.autodesk.com/t5/net-forum/reading-objacts-location-x-y/m-p/3047318#M60628</link>
      <description>&lt;P&gt;ok &lt;img id="manhappy" class="emoticon emoticon-manhappy" src="https://forums.autodesk.com/i/smilies/16x16_man-happy.png" alt="Man Happy" title="Man Happy" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and how can I let the user to pick the layer he wants to work with?&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jun 2011 15:09:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/reading-objacts-location-x-y/m-p/3047318#M60628</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-05T15:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: Reading objacts location (X Y)</title>
      <link>https://forums.autodesk.com/t5/net-forum/reading-objacts-location-x-y/m-p/3047338#M60629</link>
      <description>&lt;P&gt;You could either get the user to type in a layer name using Editor.GetString() or you could put a combobox on a form and get the user to pick one or smething like that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can get all layer names by iterating through all the LayerTableRecords in the LayerTable:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;List&amp;lt;string&amp;gt; names = new List&amp;lt;string&amp;gt;();
LayerTable lt = (LayerTable)trans.GetObject(db.LayerTableId, OpenMode.ForRead);
foreach(ObjectId id in lt)
{
     LayerTableRecord ltr = (LayerTableRecord)trans.GetObject(id, OpenMode.ForRead);
     names.Add(ltr.Name);
}&lt;/PRE&gt;</description>
      <pubDate>Sun, 05 Jun 2011 16:05:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/reading-objacts-location-x-y/m-p/3047338#M60629</guid>
      <dc:creator>jamierobertson1</dc:creator>
      <dc:date>2011-06-05T16:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: Reading objacts location (X Y)</title>
      <link>https://forums.autodesk.com/t5/net-forum/reading-objacts-location-x-y/m-p/3047524#M60630</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/60537"&gt;@jamierobertson1&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;You can quite get the objectIDs of all text on a layer passing a SelectionFilter to the Editor.selectAll method::&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;TypedValue[] tv = new TypedValue[] {new TypedValue((int)DxfCode.Start, "TEXT"), new TypedValue((int)DxfCode.LayerName, "Layer 1")};

SelectionFilter sf = new SelectionFilter(tv);
SelectionSet set = ed.SelectAll(sf).Value;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;You can then open the text entities from the objectIDs in the selectionSet and then access their properties.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for the&amp;nbsp;begginer&amp;nbsp;question, beside "Hello World" its my first program in this enviroment.&amp;nbsp;Do I write it in a CommandMethod?&amp;nbsp;&amp;nbsp;What do I do with the objectIDs?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2011 06:13:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/reading-objacts-location-x-y/m-p/3047524#M60630</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-06T06:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: Reading objacts location (X Y)</title>
      <link>https://forums.autodesk.com/t5/net-forum/reading-objacts-location-x-y/m-p/3047572#M60631</link>
      <description>&lt;P&gt;Have a look at some of the .net training material and samples here&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A target="_self" href="http://http://usa.autodesk.com/adsk/servlet/index?id=1911627&amp;amp;siteID=123112"&gt;http://http://usa.autodesk.com/adsk/servlet/index?id=1911627&amp;amp;siteID=123112&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2011 07:56:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/reading-objacts-location-x-y/m-p/3047572#M60631</guid>
      <dc:creator>jamierobertson1</dc:creator>
      <dc:date>2011-06-06T07:56:34Z</dc:date>
    </item>
  </channel>
</rss>

