<?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: Determine Layout of Object in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/determine-layout-of-object/m-p/1338707#M84900</link>
    <description>&amp;gt;&amp;gt;I have a list of these BlockReferences. I just need to be able to identify what layout they exist in.&lt;BR /&gt;
&lt;BR /&gt;
Get the blockReference's owner using BlockId property. It will be a BlockTableRecord (either a user created block for nested blocks, or one of Model / Paper spaces). Check the layoutId of the BTR. If it is valid, then open it to get the layout. &lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;&amp;gt;How can I get a list of the available "Spaces"?&lt;BR /&gt;
Iterate through the block table and see which BTRs have layoutId. Only Model/Paper spaces have a layout assigned.&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;&amp;gt;Armed with a list of available "Spaces", how can I determine whether or not a block reference (by BlockReferenceID) exist in one of these spaces.&lt;BR /&gt;
Check if the block reference's owner matches the BTR id

Message was edited by: KrishnaK</description>
    <pubDate>Fri, 27 May 2005 21:06:13 GMT</pubDate>
    <dc:creator>KrishnaK</dc:creator>
    <dc:date>2005-05-27T21:06:13Z</dc:date>
    <item>
      <title>Determine Layout of Object</title>
      <link>https://forums.autodesk.com/t5/net-forum/determine-layout-of-object/m-p/1338700#M84893</link>
      <description>I have queried the database and retrieved a selection set of objects (Block References)&lt;BR /&gt;
&lt;BR /&gt;
I would like to determine if each of these Block References exist in Model space or a layout.  I would like to retrieve the layout name.&lt;BR /&gt;
&lt;BR /&gt;
Can anyone help me.&lt;BR /&gt;
&lt;BR /&gt;
I have the BlockReference object.</description>
      <pubDate>Fri, 27 May 2005 14:05:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/determine-layout-of-object/m-p/1338700#M84893</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-27T14:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Determine Layout of Object</title>
      <link>https://forums.autodesk.com/t5/net-forum/determine-layout-of-object/m-p/1338701#M84894</link>
      <description>You go open the BlockTableRecord that the BlockReference referenced and then &lt;BR /&gt;
query the LayoutId property on the BlockTableRecord. If it is non-null then &lt;BR /&gt;
you can open it as a Layout and ask for its name.&lt;BR /&gt;
&lt;BR /&gt;
Albert&lt;BR /&gt;
&lt;CHRIS ludtke=""&gt; wrote in message news:4858659@discussion.autodesk.com...&lt;BR /&gt;
I have queried the database and retrieved a selection set of objects (Block &lt;BR /&gt;
References)&lt;BR /&gt;
&lt;BR /&gt;
I would like to determine if each of these Block References exist in Model &lt;BR /&gt;
space or a layout.  I would like to retrieve the layout name.&lt;BR /&gt;
&lt;BR /&gt;
Can anyone help me.&lt;BR /&gt;
&lt;BR /&gt;
I have the BlockReference object.&lt;/CHRIS&gt;</description>
      <pubDate>Fri, 27 May 2005 15:37:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/determine-layout-of-object/m-p/1338701#M84894</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-27T15:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: Determine Layout of Object</title>
      <link>https://forums.autodesk.com/t5/net-forum/determine-layout-of-object/m-p/1338702#M84895</link>
      <description>Thanks Albert,&lt;BR /&gt;
&lt;BR /&gt;
Another question ...&lt;BR /&gt;
&lt;BR /&gt;
I have the Layout ID, how do I open it as a layout?&lt;BR /&gt;
&lt;BR /&gt;
The following does not work&lt;BR /&gt;
&lt;BR /&gt;
oAcadLayout = CType(oAcadLayoutID, Layout)&lt;BR /&gt;
&lt;BR /&gt;
"Albert Szilvasy" &lt;NOT_PROVIDED&gt; wrote in message &lt;BR /&gt;
news:4858822@discussion.autodesk.com...&lt;BR /&gt;
You go open the BlockTableRecord that the BlockReference referenced and then&lt;BR /&gt;
query the LayoutId property on the BlockTableRecord. If it is non-null then&lt;BR /&gt;
you can open it as a Layout and ask for its name.&lt;BR /&gt;
&lt;BR /&gt;
Albert&lt;BR /&gt;
&lt;CHRIS ludtke=""&gt; wrote in message news:4858659@discussion.autodesk.com...&lt;BR /&gt;
I have queried the database and retrieved a selection set of objects (Block&lt;BR /&gt;
References)&lt;BR /&gt;
&lt;BR /&gt;
I would like to determine if each of these Block References exist in Model&lt;BR /&gt;
space or a layout.  I would like to retrieve the layout name.&lt;BR /&gt;
&lt;BR /&gt;
Can anyone help me.&lt;BR /&gt;
&lt;BR /&gt;
I have the BlockReference object.&lt;/CHRIS&gt;&lt;/NOT_PROVIDED&gt;</description>
      <pubDate>Fri, 27 May 2005 16:55:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/determine-layout-of-object/m-p/1338702#M84895</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-27T16:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: Determine Layout of Object</title>
      <link>https://forums.autodesk.com/t5/net-forum/determine-layout-of-object/m-p/1338703#M84896</link>
      <description>Chris, you need to  open the object with its objectID. Check out the AutoCAD.NET labs posted. It will help you understand opening objects in a transaction.</description>
      <pubDate>Fri, 27 May 2005 18:01:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/determine-layout-of-object/m-p/1338703#M84896</guid>
      <dc:creator>KrishnaK</dc:creator>
      <dc:date>2005-05-27T18:01:30Z</dc:date>
    </item>
    <item>
      <title>Re: Determine Layout of Object</title>
      <link>https://forums.autodesk.com/t5/net-forum/determine-layout-of-object/m-p/1338704#M84897</link>
      <description>I encourage everyone to download the labs.  They helped me a lot.&lt;BR /&gt;
&lt;BR /&gt;
I am still having problems geting the layout from the Layout ID obtained from the BlockTable Record ...&lt;BR /&gt;
&lt;BR /&gt;
 btrBlockTableRecord = CType(Tr.GetObject(oAcadBlockRef.BlockTableRecord, OpenMode.ForRead, False), BlockTableRecord) ' This works well oAcadBlockRef is a blockreference that I wish to identify, manage and plot&lt;BR /&gt;
&lt;BR /&gt;
oAcadLayoutID = btrBlockTableRecord.LayoutId() 'This appears to return a valid LayoutID.&lt;BR /&gt;
&lt;BR /&gt;
 oAcadLayout = Tr.GetObject(oAcadLayoutID, OpenMode.ForRead, False, False) ' This does not work. I "morphed" this from examples that I have found in the labs and on the Net. &lt;BR /&gt;
&lt;BR /&gt;
I am unable to obtain a valid layout object given the objectID.</description>
      <pubDate>Fri, 27 May 2005 19:03:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/determine-layout-of-object/m-p/1338704#M84897</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-27T19:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: Determine Layout of Object</title>
      <link>https://forums.autodesk.com/t5/net-forum/determine-layout-of-object/m-p/1338705#M84898</link>
      <description>Chris,&lt;BR /&gt;
&lt;BR /&gt;
 AutoCAD only allows you to view "Spaces" i.e., model space or paper spaceXXX. Only these viewable blocktablerecords have an associated layout. You can only plot these. Other blocktablerecords  or block definitions that you create, cannot be viewed by itself but only through a block reference inserted in one of the "spaces" (or through a viewport viewing the model). &lt;BR /&gt;
&lt;BR /&gt;
I hope this made it clear.</description>
      <pubDate>Fri, 27 May 2005 19:24:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/determine-layout-of-object/m-p/1338705#M84898</guid>
      <dc:creator>KrishnaK</dc:creator>
      <dc:date>2005-05-27T19:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: Determine Layout of Object</title>
      <link>https://forums.autodesk.com/t5/net-forum/determine-layout-of-object/m-p/1338706#M84899</link>
      <description>I fully understand that I will not be able to plot a BlockTableRecord.&lt;BR /&gt;
&lt;BR /&gt;
I have identified blocks that are formats that have been placed on one or several layouts.  &lt;BR /&gt;
&lt;BR /&gt;
Thanks to your help, I am able to get attribute information from these formats to determine page number, revision and Drawing Number information.&lt;BR /&gt;
&lt;BR /&gt;
My problem is different users rename layouts and  place these formats in model space, paper space and different layouts.  One layout can have 0, 1 or 60 of these Formats.&lt;BR /&gt;
&lt;BR /&gt;
I have a list of these BlockReferences.  I just need to be able to identify what layout they exist in.&lt;BR /&gt;
&lt;BR /&gt;
How can I get a list of the available "Spaces"?&lt;BR /&gt;
&lt;BR /&gt;
Armed with a list of available "Spaces", how can I determine whether or not a block reference (by BlockReferenceID) exist in one of these spaces.</description>
      <pubDate>Fri, 27 May 2005 20:56:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/determine-layout-of-object/m-p/1338706#M84899</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-27T20:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: Determine Layout of Object</title>
      <link>https://forums.autodesk.com/t5/net-forum/determine-layout-of-object/m-p/1338707#M84900</link>
      <description>&amp;gt;&amp;gt;I have a list of these BlockReferences. I just need to be able to identify what layout they exist in.&lt;BR /&gt;
&lt;BR /&gt;
Get the blockReference's owner using BlockId property. It will be a BlockTableRecord (either a user created block for nested blocks, or one of Model / Paper spaces). Check the layoutId of the BTR. If it is valid, then open it to get the layout. &lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;&amp;gt;How can I get a list of the available "Spaces"?&lt;BR /&gt;
Iterate through the block table and see which BTRs have layoutId. Only Model/Paper spaces have a layout assigned.&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;&amp;gt;Armed with a list of available "Spaces", how can I determine whether or not a block reference (by BlockReferenceID) exist in one of these spaces.&lt;BR /&gt;
Check if the block reference's owner matches the BTR id

Message was edited by: KrishnaK</description>
      <pubDate>Fri, 27 May 2005 21:06:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/determine-layout-of-object/m-p/1338707#M84900</guid>
      <dc:creator>KrishnaK</dc:creator>
      <dc:date>2005-05-27T21:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: Determine Layout of Object</title>
      <link>https://forums.autodesk.com/t5/net-forum/determine-layout-of-object/m-p/1338708#M84901</link>
      <description>Thanks,  I am on a roll.&lt;BR /&gt;
&lt;BR /&gt;
I am getting internal names for the layouts that do not match the names on the "Tabs" shown in the user interface (example, *Paper_space313)&lt;BR /&gt;
&lt;BR /&gt;
How do go about getting the name of the layout that the user sees?</description>
      <pubDate>Tue, 31 May 2005 15:20:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/determine-layout-of-object/m-p/1338708#M84901</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-31T15:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: Determine Layout of Object</title>
      <link>https://forums.autodesk.com/t5/net-forum/determine-layout-of-object/m-p/1338709#M84902</link>
      <description>Look for the layout name in the layout dictionary (ACAD_LAYOUT). It is the name user sees. You are wrongly getting the name of the layout from the BTR.</description>
      <pubDate>Tue, 31 May 2005 15:39:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/determine-layout-of-object/m-p/1338709#M84902</guid>
      <dc:creator>KrishnaK</dc:creator>
      <dc:date>2005-05-31T15:39:51Z</dc:date>
    </item>
  </channel>
</rss>

