<?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: Howto get Space / Layout of object(id) in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/howto-get-space-layout-of-object-id/m-p/8797179#M22365</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use the BlockId property of the entity to get ObjectId of the BlockTableRecord instance which owns the entity. It can be either a layout or a block definition.&lt;/P&gt;
&lt;P&gt;If you need the Layout instance, you can check if its IsLayout property equals true and, then, get the Layout object with the BlockTableRecord.LayoutId property.&lt;/P&gt;</description>
    <pubDate>Fri, 17 May 2019 06:12:17 GMT</pubDate>
    <dc:creator>_gile</dc:creator>
    <dc:date>2019-05-17T06:12:17Z</dc:date>
    <item>
      <title>Howto get Space / Layout of object(id)</title>
      <link>https://forums.autodesk.com/t5/net-forum/howto-get-space-layout-of-object-id/m-p/8796890#M22364</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;how can I get the Layout of an existing Entity (e.g. AttributeReference entity) ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have the AttributeReference object and can get it's ObjectID.&lt;/P&gt;
&lt;P&gt;Is there a property or function to get the Layout of the object?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks a lot for your help&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;nil&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2019 23:53:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/howto-get-space-layout-of-object-id/m-p/8796890#M22364</guid>
      <dc:creator>faceter</dc:creator>
      <dc:date>2019-05-16T23:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: Howto get Space / Layout of object(id)</title>
      <link>https://forums.autodesk.com/t5/net-forum/howto-get-space-layout-of-object-id/m-p/8797179#M22365</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use the BlockId property of the entity to get ObjectId of the BlockTableRecord instance which owns the entity. It can be either a layout or a block definition.&lt;/P&gt;
&lt;P&gt;If you need the Layout instance, you can check if its IsLayout property equals true and, then, get the Layout object with the BlockTableRecord.LayoutId property.&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2019 06:12:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/howto-get-space-layout-of-object-id/m-p/8797179#M22365</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2019-05-17T06:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: Howto get Space / Layout of object(id)</title>
      <link>https://forums.autodesk.com/t5/net-forum/howto-get-space-layout-of-object-id/m-p/8797705#M22366</link>
      <description>&lt;P&gt;Thanks a lot&lt;/P&gt;
&lt;P&gt;works fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;nil&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2019 10:55:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/howto-get-space-layout-of-object-id/m-p/8797705#M22366</guid>
      <dc:creator>faceter</dc:creator>
      <dc:date>2019-05-17T10:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Howto get Space / Layout of object(id)</title>
      <link>https://forums.autodesk.com/t5/net-forum/howto-get-space-layout-of-object-id/m-p/12727106#M22367</link>
      <description>&lt;LI-CODE lang="general"&gt;using (Transaction tr = db.TransactionManager.StartTransaction())
{
    Entity entity = tr.GetObject(id, OpenMode.ForRead) as Entity;                    
    BlockTableRecord btr = tr.GetObject(entity.BlockId, OpenMode.ForRead) as BlockTableRecord;

    if (btr.IsLayout)
    {

    }
    else
    {

    }

           

    tr.Commit();
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;some code demonstrating the above for a quick cut and paste.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All credit to Gilles for the answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 08:55:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/howto-get-space-layout-of-object-id/m-p/12727106#M22367</guid>
      <dc:creator>BKSpurgeon</dc:creator>
      <dc:date>2024-04-23T08:55:24Z</dc:date>
    </item>
  </channel>
</rss>

