<?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 Get data from drawing without opening it in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/get-data-from-drawing-without-opening-it/m-p/6862729#M32821</link>
    <description>&lt;P&gt;...or can I open it as ReadOnly?&lt;/P&gt;
&lt;P&gt;I want to gather some data from another drawing, specifically in my case, some block info and layout tab info.&amp;nbsp; I took some code I had for "Design Center" like importing of blocks for insertion.&amp;nbsp; But in this case, I would like to pull the data regardless if the drawing is in use or not.&amp;nbsp; One work around, I thought of, is to copy the drawing to my temp folder then open it.&amp;nbsp; But, I thought first to see if there is an easier way.&lt;/P&gt;
&lt;P&gt;Current code I have so far, I feed the method the drawing name I want to read:&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;public&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Consolas" size="2"&gt;static&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Consolas" size="2"&gt;void&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; fetchDwgData(&lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;Database&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; acDb, &lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;Editor&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; acEd, &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;string&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; dsDwg)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&amp;nbsp; DocumentCollection&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; acDm = &lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;acApp&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;.DocumentManager;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&amp;nbsp; Database&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; dsDb = &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;new&lt;/FONT&gt; &lt;FONT color="#2b91af" face="Consolas" size="2"&gt;Database&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;false&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;, &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;true&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&amp;nbsp; try&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dsDb.ReadDwgFile(dsDwg, System.IO.&lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;FileShare&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;.Read, &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;true&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;, &lt;/FONT&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;""&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ObjectIdCollection&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; blkIds = &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;new&lt;/FONT&gt; &lt;FONT color="#2b91af" face="Consolas" size="2"&gt;ObjectIdCollection&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; using&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; (&lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;Transaction&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; acTrans = acDb.TransactionManager.StartOpenCloseTransaction())&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BlockTable&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; dsBlkTbl = (&lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;BlockTable&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;)acTrans.GetObject(dsDb.BlockTableId, &lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;OpenMode&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;.ForRead, &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;false&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; (&lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;ObjectId&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; btrId &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;in&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; dsBlkTbl)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; using&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; (&lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;BlockTableRecord&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; btr = (&lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;BlockTableRecord&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;)acTrans.GetObject(btrId, &lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;OpenMode&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;.ForRead, &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;false&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;))&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; (!btr.IsAnonymous &amp;amp;&amp;amp; !btr.IsLayout)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000" face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //do stuff&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dsDb.Dispose();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp; catch&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000" face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //exiting due to error&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;</description>
    <pubDate>Wed, 08 Feb 2017 14:04:02 GMT</pubDate>
    <dc:creator>dennis</dc:creator>
    <dc:date>2017-02-08T14:04:02Z</dc:date>
    <item>
      <title>Get data from drawing without opening it</title>
      <link>https://forums.autodesk.com/t5/net-forum/get-data-from-drawing-without-opening-it/m-p/6862729#M32821</link>
      <description>&lt;P&gt;...or can I open it as ReadOnly?&lt;/P&gt;
&lt;P&gt;I want to gather some data from another drawing, specifically in my case, some block info and layout tab info.&amp;nbsp; I took some code I had for "Design Center" like importing of blocks for insertion.&amp;nbsp; But in this case, I would like to pull the data regardless if the drawing is in use or not.&amp;nbsp; One work around, I thought of, is to copy the drawing to my temp folder then open it.&amp;nbsp; But, I thought first to see if there is an easier way.&lt;/P&gt;
&lt;P&gt;Current code I have so far, I feed the method the drawing name I want to read:&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;public&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Consolas" size="2"&gt;static&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Consolas" size="2"&gt;void&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; fetchDwgData(&lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;Database&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; acDb, &lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;Editor&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; acEd, &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;string&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; dsDwg)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&amp;nbsp; DocumentCollection&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; acDm = &lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;acApp&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;.DocumentManager;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&amp;nbsp; Database&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; dsDb = &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;new&lt;/FONT&gt; &lt;FONT color="#2b91af" face="Consolas" size="2"&gt;Database&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;false&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;, &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;true&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&amp;nbsp; try&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dsDb.ReadDwgFile(dsDwg, System.IO.&lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;FileShare&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;.Read, &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;true&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;, &lt;/FONT&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;""&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ObjectIdCollection&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; blkIds = &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;new&lt;/FONT&gt; &lt;FONT color="#2b91af" face="Consolas" size="2"&gt;ObjectIdCollection&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; using&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; (&lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;Transaction&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; acTrans = acDb.TransactionManager.StartOpenCloseTransaction())&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BlockTable&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; dsBlkTbl = (&lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;BlockTable&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;)acTrans.GetObject(dsDb.BlockTableId, &lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;OpenMode&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;.ForRead, &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;false&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; (&lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;ObjectId&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; btrId &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;in&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; dsBlkTbl)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; using&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; (&lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;BlockTableRecord&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; btr = (&lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;BlockTableRecord&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;)acTrans.GetObject(btrId, &lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;OpenMode&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;.ForRead, &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;false&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;))&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; (!btr.IsAnonymous &amp;amp;&amp;amp; !btr.IsLayout)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000" face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //do stuff&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dsDb.Dispose();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp; catch&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000" face="Consolas" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //exiting due to error&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2017 14:04:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/get-data-from-drawing-without-opening-it/m-p/6862729#M32821</guid>
      <dc:creator>dennis</dc:creator>
      <dc:date>2017-02-08T14:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: Get data from drawing without opening it</title>
      <link>https://forums.autodesk.com/t5/net-forum/get-data-from-drawing-without-opening-it/m-p/6862798#M32822</link>
      <description>&lt;P&gt;Yes, you did it correctly in regard of getting data without opening it (in AutoCAD editor). So what is your question, then?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One minor thing, you may want to place dsDb.Dispose() in "finally{ } clause" to make sure the database is always disposed. Better yet, use&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;using (Database dsDb= new Database())&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for more simplified code than try {...} finally{...}.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2017 14:20:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/get-data-from-drawing-without-opening-it/m-p/6862798#M32822</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2017-02-08T14:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: Get data from drawing without opening it</title>
      <link>https://forums.autodesk.com/t5/net-forum/get-data-from-drawing-without-opening-it/m-p/6863012#M32823</link>
      <description>&lt;P&gt;Thanks for the suggestion Norman.&amp;nbsp; The problem arises, if someone has the drawing open already, then I can't open the drawing "on the side".&amp;nbsp; So, is there a way to Open the drawing "on the side" regardless if it is in use or not by another user?&amp;nbsp; Or, do you think my thought to copy the drawing first to the temp folder is the way to go?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2017 15:19:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/get-data-from-drawing-without-opening-it/m-p/6863012#M32823</guid>
      <dc:creator>dennis</dc:creator>
      <dc:date>2017-02-08T15:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: Get data from drawing without opening it</title>
      <link>https://forums.autodesk.com/t5/net-forum/get-data-from-drawing-without-opening-it/m-p/6863054#M32824</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try with:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;dsDb.ReadDwgFile(dsDwg, FileOpenMode.OpenForReadAndAllShare, true, null);&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Feb 2017 15:29:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/get-data-from-drawing-without-opening-it/m-p/6863054#M32824</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2017-02-08T15:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: Get data from drawing without opening it</title>
      <link>https://forums.autodesk.com/t5/net-forum/get-data-from-drawing-without-opening-it/m-p/6863100#M32825</link>
      <description>&lt;P&gt;That's it Giles!&lt;/P&gt;
&lt;P&gt;Thank you very much, I was just Googling around and was reading about the FileOpenMode method, thinking that would be my next 'try', then my email notification popped up regarding your reply.&amp;nbsp; It works just as I need it to work.&amp;nbsp; Which now, has me wanting to revisit a few of the programs I have written to make this change as well.&amp;nbsp; Very clean, thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2017 15:42:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/get-data-from-drawing-without-opening-it/m-p/6863100#M32825</guid>
      <dc:creator>dennis</dc:creator>
      <dc:date>2017-02-08T15:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: Get data from drawing without opening it</title>
      <link>https://forums.autodesk.com/t5/net-forum/get-data-from-drawing-without-opening-it/m-p/6897237#M32826</link>
      <description>&lt;P&gt;Just a shot in the dark but if you're just trying to import borders, etc from paperspace and the viewports, you can use the Layout-&amp;gt;from template option.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 23:42:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/get-data-from-drawing-without-opening-it/m-p/6897237#M32826</guid>
      <dc:creator>brianchapmandesign</dc:creator>
      <dc:date>2017-02-22T23:42:14Z</dc:date>
    </item>
  </channel>
</rss>

