<?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: Need help programming around 2015 API CreateLayout big in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/need-help-programming-around-2015-api-createlayout-big/m-p/5488601#M41552</link>
    <description>&lt;PRE&gt;                using (Transaction tr = db.TransactionManager.StartTransaction())
                {
                    BlockTable bt = (BlockTable)tr.GetObject(db.BlockTableId, OpenMode.ForRead);
                    foreach (ObjectId btrId in bt)
                    {
                        BlockTableRecord btr = (BlockTableRecord)tr.GetObject(btrId, OpenMode.ForRead);
                        if (btr.IsLayout)
                        {
                            Layout layout = (Layout)tr.GetObject(btr.LayoutId, OpenMode.ForRead);
                            ed.WriteMessage("\n {0}", layout.LayoutName);
                        }
                    }
                    tr.Commit();
                }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Jan 2015 21:46:50 GMT</pubDate>
    <dc:creator>SENL1362</dc:creator>
    <dc:date>2015-01-29T21:46:50Z</dc:date>
    <item>
      <title>Need help programming around 2015 API CreateLayout big</title>
      <link>https://forums.autodesk.com/t5/net-forum/need-help-programming-around-2015-api-createlayout-big/m-p/5484373#M41548</link>
      <description>&lt;P&gt;There is currently a bug in the 2015 API that will not let you create a new layout in a drawing if you have previously opened that drawing's Layout DBDictionary. &lt;SPAN&gt;[42879:Layout Manager throws a eSetFailed Error]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a lot of code that opens that particular dictionary to see what layouts exist in a drawing and what their names are. Is there a clever way to do this without opening the Layout dictionary or resorting to using COM?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Darren&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jan 2015 17:15:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/need-help-programming-around-2015-api-createlayout-big/m-p/5484373#M41548</guid>
      <dc:creator>dhaverstick</dc:creator>
      <dc:date>2015-01-27T17:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: Need help programming around 2015 API CreateLayout big</title>
      <link>https://forums.autodesk.com/t5/net-forum/need-help-programming-around-2015-api-createlayout-big/m-p/5488247#M41549</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The&amp;nbsp;&lt;SPAN&gt;.NET sample at&amp;nbsp;&lt;/SPAN&gt;&lt;A target="_blank" rel="nofollow" href="http://help.autodesk.com/view/ACD/2015/ENU/?guid=GUID-5FA86EF3-DEFD-4256-BB1C-56DAC32BD868"&gt;Import a layout from an external drawing&lt;/A&gt;&amp;nbsp;may help you?&amp;nbsp;You may have to add the following line to avoid a access denied error...besides that...it works in 2015.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using docLock As DocumentLock = acDoc.LockDocument()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Gary&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jan 2015 18:28:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/need-help-programming-around-2015-api-createlayout-big/m-p/5488247#M41549</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-29T18:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Need help programming around 2015 API CreateLayout big</title>
      <link>https://forums.autodesk.com/t5/net-forum/need-help-programming-around-2015-api-createlayout-big/m-p/5488394#M41550</link>
      <description>&lt;P&gt;Thanks, Gary, but I should have been more clear in my original post. I need to 1) iterate through a drawing's existing layouts to get their names AND&amp;nbsp;2) possibly create a new layout in the drawing. With the bug in the 2015 API, I cannot do that at this time. I can accomplish either task separately but I cannot create a layout IF I have previously opened the layout DBDictionary. And the only way I know how to get all the names of the layouts is to open that dictionary.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can go the COM route to get the names of the existing layouts but I would prefer not to do that if at all possible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I would really like is for Autodesk to fix the **** bug. At this rate, the 2016 version of the software will be out before the error is corrected in the 2015 version.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Darren&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jan 2015 19:39:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/need-help-programming-around-2015-api-createlayout-big/m-p/5488394#M41550</guid>
      <dc:creator>dhaverstick</dc:creator>
      <dc:date>2015-01-29T19:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: Need help programming around 2015 API CreateLayout big</title>
      <link>https://forums.autodesk.com/t5/net-forum/need-help-programming-around-2015-api-createlayout-big/m-p/5488524#M41551</link>
      <description>&lt;P&gt;two ideas (noy coded)&lt;BR /&gt;1. activate layout using the layoutNr then get layoutName using LayoutManager&lt;BR /&gt;2. query blocks and read their IsLayout flag then get the layout object using the layout reference&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jan 2015 20:53:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/need-help-programming-around-2015-api-createlayout-big/m-p/5488524#M41551</guid>
      <dc:creator>SENL1362</dc:creator>
      <dc:date>2015-01-29T20:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: Need help programming around 2015 API CreateLayout big</title>
      <link>https://forums.autodesk.com/t5/net-forum/need-help-programming-around-2015-api-createlayout-big/m-p/5488601#M41552</link>
      <description>&lt;PRE&gt;                using (Transaction tr = db.TransactionManager.StartTransaction())
                {
                    BlockTable bt = (BlockTable)tr.GetObject(db.BlockTableId, OpenMode.ForRead);
                    foreach (ObjectId btrId in bt)
                    {
                        BlockTableRecord btr = (BlockTableRecord)tr.GetObject(btrId, OpenMode.ForRead);
                        if (btr.IsLayout)
                        {
                            Layout layout = (Layout)tr.GetObject(btr.LayoutId, OpenMode.ForRead);
                            ed.WriteMessage("\n {0}", layout.LayoutName);
                        }
                    }
                    tr.Commit();
                }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jan 2015 21:46:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/need-help-programming-around-2015-api-createlayout-big/m-p/5488601#M41552</guid>
      <dc:creator>SENL1362</dc:creator>
      <dc:date>2015-01-29T21:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need help programming around 2015 API CreateLayout big</title>
      <link>https://forums.autodesk.com/t5/net-forum/need-help-programming-around-2015-api-createlayout-big/m-p/5489462#M41553</link>
      <description>&lt;P&gt;Thanks so much,&amp;nbsp;&lt;SPAN&gt;SENL1362! That is exactly what I am looking for.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;On a side note, my company is a member of the Autodesk Developer Network and I haven't received any good coding advice from them on this topic.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks again!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Darren&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jan 2015 15:02:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/need-help-programming-around-2015-api-createlayout-big/m-p/5489462#M41553</guid>
      <dc:creator>dhaverstick</dc:creator>
      <dc:date>2015-01-30T15:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: Need help programming around 2015 API CreateLayout big</title>
      <link>https://forums.autodesk.com/t5/net-forum/need-help-programming-around-2015-api-createlayout-big/m-p/5489636#M41554</link>
      <description>&lt;P&gt;sorry about that, but there are good Adesk supporters, so don't lose faith in them.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jan 2015 16:41:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/need-help-programming-around-2015-api-createlayout-big/m-p/5489636#M41554</guid>
      <dc:creator>SENL1362</dc:creator>
      <dc:date>2015-01-30T16:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Need help programming around 2015 API CreateLayout big</title>
      <link>https://forums.autodesk.com/t5/net-forum/need-help-programming-around-2015-api-createlayout-big/m-p/5496718#M41555</link>
      <description>&lt;P&gt;Another way to work around this is to inspect the layout dictionary in a &lt;STRONG&gt;separate transaction&lt;/STRONG&gt; from the one in which you create the new layout. The problem only occurs if&amp;nbsp;you have the&amp;nbsp;layout dictionary open while you create the layout.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Feb 2015 21:54:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/need-help-programming-around-2015-api-createlayout-big/m-p/5496718#M41555</guid>
      <dc:creator>autodaug</dc:creator>
      <dc:date>2015-02-05T21:54:55Z</dc:date>
    </item>
  </channel>
</rss>

