<?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: Layers names in layouts in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/layers-names-in-layouts/m-p/11922246#M9261</link>
    <description>&lt;P&gt;You can create an 'Out-of-pProcess' application (Windows Form app) but this application still need to get or create an AutoCAD process (even not Visible) to be able to read a drawing database.&lt;/P&gt;
&lt;P&gt;See &lt;A href="https://help.autodesk.com/view/OARX/2023/ENU/?guid=GUID-C8C65D7A-EC3A-42D8-BF02-4B13C2EA1A4B" target="_blank" rel="noopener"&gt;this topic&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Wed, 26 Apr 2023 05:44:25 GMT</pubDate>
    <dc:creator>_gile</dc:creator>
    <dc:date>2023-04-26T05:44:25Z</dc:date>
    <item>
      <title>Layers names in layouts</title>
      <link>https://forums.autodesk.com/t5/net-forum/layers-names-in-layouts/m-p/11883425#M9251</link>
      <description>&lt;P&gt;I am trying to extract layer names in each layout.&lt;/P&gt;&lt;P&gt;any suggestion, please&lt;/P&gt;&lt;P&gt;C#&lt;/P&gt;</description>
      <pubDate>Sun, 09 Apr 2023 13:15:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/layers-names-in-layouts/m-p/11883425#M9251</guid>
      <dc:creator>soari.do</dc:creator>
      <dc:date>2023-04-09T13:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: Layers names in layouts</title>
      <link>https://forums.autodesk.com/t5/net-forum/layers-names-in-layouts/m-p/11883512#M9252</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Here's a way.&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;        static string[] GetLayers(Layout layout, Transaction tr) =&amp;gt;
            ((BlockTableRecord)tr.GetObject(layout.BlockTableRecordId, OpenMode.ForRead))
            .Cast&amp;lt;ObjectId&amp;gt;()
            .Select(id =&amp;gt; (Entity)tr.GetObject(id, OpenMode.ForRead))
            .GroupBy(ent =&amp;gt; ent.Layer)
            .Select(group =&amp;gt; group.Key)
            .ToArray();

        static Dictionary&amp;lt;string, string[]&amp;gt; GetLayersInLayouts(Database db)
        {
            using (var tr = db.TransactionManager.StartOpenCloseTransaction())
            {
                var layoutDict = (DBDictionary)tr.GetObject(db.LayoutDictionaryId, OpenMode.ForRead);
                return layoutDict
                    .Cast&amp;lt;DictionaryEntry&amp;gt;()
                    .Select(entry =&amp;gt; (Layout)tr.GetObject((ObjectId)entry.Value, OpenMode.ForRead))
                    .ToDictionary(layout =&amp;gt; layout.LayoutName, layout =&amp;gt; GetLayers(layout, tr));
            }
        }&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 09 Apr 2023 14:45:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/layers-names-in-layouts/m-p/11883512#M9252</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2023-04-09T14:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: Layers names in layouts</title>
      <link>https://forums.autodesk.com/t5/net-forum/layers-names-in-layouts/m-p/11884075#M9253</link>
      <description>&lt;P&gt;Do you mind me asking what you're going to do with this info? And thanks to _Giles&lt;/P&gt;</description>
      <pubDate>Sun, 09 Apr 2023 22:59:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/layers-names-in-layouts/m-p/11884075#M9253</guid>
      <dc:creator>1wildwes</dc:creator>
      <dc:date>2023-04-09T22:59:57Z</dc:date>
    </item>
    <item>
      <title>Re: Layers names in layouts</title>
      <link>https://forums.autodesk.com/t5/net-forum/layers-names-in-layouts/m-p/11892137#M9254</link>
      <description>&lt;P&gt;Thanks Gill, It worked fine.&lt;/P&gt;&lt;P&gt;But it is getting only some layers not all layers from layout.&lt;/P&gt;&lt;P&gt;What layers it will not get?&lt;/P&gt;&lt;P&gt;Can help get all layers from the layout.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;P&gt;Rao&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 01:15:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/layers-names-in-layouts/m-p/11892137#M9254</guid>
      <dc:creator>soari.do</dc:creator>
      <dc:date>2023-04-13T01:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: Layers names in layouts</title>
      <link>https://forums.autodesk.com/t5/net-forum/layers-names-in-layouts/m-p/11892445#M9255</link>
      <description>&lt;P&gt;The method I posted gets all the layers of all entities within the BlockTableRecord of each layout.&lt;/P&gt;
&lt;P&gt;I do not understand what you want to achieve.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 05:39:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/layers-names-in-layouts/m-p/11892445#M9255</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2023-04-13T05:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: Layers names in layouts</title>
      <link>https://forums.autodesk.com/t5/net-forum/layers-names-in-layouts/m-p/11894770#M9256</link>
      <description>&lt;P&gt;Now if a viewport is locked only one layer is retrieved.&lt;/P&gt;&lt;P&gt;I want to retrieve all layers that are set in viewport whether a viewport is locked or unlocked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Rao&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 21:46:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/layers-names-in-layouts/m-p/11894770#M9256</guid>
      <dc:creator>soari.do</dc:creator>
      <dc:date>2023-04-13T21:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: Layers names in layouts</title>
      <link>https://forums.autodesk.com/t5/net-forum/layers-names-in-layouts/m-p/11894862#M9257</link>
      <description>&lt;P&gt;That's different than your first request. You asked for layers in a layout, not a viewport. &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/109424"&gt;@_gile&lt;/a&gt; 's code will give you the layers of Entities on the layout. If there is only one Entity on the layout, you will only get the layer that the viewport is on. What do you want to know about layers in a viewport? Whether they are frozen or not? Or what the layers entities are using? It would be similar to running &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/109424"&gt;@_gile&lt;/a&gt; code in modelspace. But you would have to restrict it to the area contained by what the viewport sees.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 22:42:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/layers-names-in-layouts/m-p/11894862#M9257</guid>
      <dc:creator>Ed__Jobe</dc:creator>
      <dc:date>2023-04-13T22:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: Layers names in layouts</title>
      <link>https://forums.autodesk.com/t5/net-forum/layers-names-in-layouts/m-p/11895035#M9258</link>
      <description>&lt;P&gt;I thought, all layers used in all viewports in a layout would be enumerated.&lt;/P&gt;&lt;P&gt;I want to know the all the non-frozen layer names used in all non-frozen viewports in layouts.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 00:56:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/layers-names-in-layouts/m-p/11895035#M9258</guid>
      <dc:creator>soari.do</dc:creator>
      <dc:date>2023-04-14T00:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: Layers names in layouts</title>
      <link>https://forums.autodesk.com/t5/net-forum/layers-names-in-layouts/m-p/11895043#M9259</link>
      <description>&lt;P&gt;I have achieved my target.&lt;/P&gt;&lt;P&gt;Thank you for your help&lt;/P&gt;</description>
      <pubDate>Sat, 15 Apr 2023 04:37:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/layers-names-in-layouts/m-p/11895043#M9259</guid>
      <dc:creator>soari.do</dc:creator>
      <dc:date>2023-04-15T04:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: Layers names in layouts</title>
      <link>https://forums.autodesk.com/t5/net-forum/layers-names-in-layouts/m-p/11921931#M9260</link>
      <description>&lt;P&gt;To summarize layers names and layouts names in excel&lt;/P&gt;&lt;P&gt;I created dll and loaded this dll in autocad.&lt;/P&gt;&lt;P&gt;For this I need to open Autocad and run this macro.&lt;/P&gt;&lt;P&gt;Is it possible to create a Windows Form app and on button press&lt;/P&gt;&lt;P&gt;can I get&amp;nbsp;layers names and layouts names from dwg file? without opening Autocad.&lt;/P&gt;&lt;P&gt;Any hint please.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 01:30:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/layers-names-in-layouts/m-p/11921931#M9260</guid>
      <dc:creator>soari.do</dc:creator>
      <dc:date>2023-04-26T01:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: Layers names in layouts</title>
      <link>https://forums.autodesk.com/t5/net-forum/layers-names-in-layouts/m-p/11922246#M9261</link>
      <description>&lt;P&gt;You can create an 'Out-of-pProcess' application (Windows Form app) but this application still need to get or create an AutoCAD process (even not Visible) to be able to read a drawing database.&lt;/P&gt;
&lt;P&gt;See &lt;A href="https://help.autodesk.com/view/OARX/2023/ENU/?guid=GUID-C8C65D7A-EC3A-42D8-BF02-4B13C2EA1A4B" target="_blank" rel="noopener"&gt;this topic&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 05:44:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/layers-names-in-layouts/m-p/11922246#M9261</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2023-04-26T05:44:25Z</dc:date>
    </item>
  </channel>
</rss>

