<?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: How to get DGN version using Python? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-get-dgn-version-using-python/m-p/514042#M40347</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I will share how I finally solved this problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I easily encapsulated calling of tools in try, except:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;try: [INDENT]try: [INDENT]arcpy.importDgn7(...) arcpy.AddMessage(u"Data imported from DGN version 7.")[/INDENT] except: [INDENT]arcpy.importDgn8(...) arcpy.AddMessage(u"Data imported from DGN version 8.")[/INDENT][/INDENT] except: &amp;nbsp;&amp;nbsp; arcpy.AddMessage(u"Import failed for both DGN versions.")&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe this will be helpful to someone.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Filip&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Jul 2012 12:42:11 GMT</pubDate>
    <dc:creator>FilipJung</dc:creator>
    <dc:date>2012-07-31T12:42:11Z</dc:date>
    <item>
      <title>How to get DGN version using Python?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-get-dgn-version-using-python/m-p/514041#M40346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm currently dealing with problem how to effectively get DGN drawing dataset version. It is important to me to know that because after version check I call prepared ETL tool from Toolbox with DGN7 or DGN8 reader and GDB writer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The way I'm doing it now is listing feature classes in given DGN dataset, getting the first feature class with more than 0 records, and importing one feature to temporal feature class. Then I'm reading value in "DocVer" field of imported feature. This works but it's painfully slow (eg. for 50 DGNs)!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I wonder if there is another way to do that. Best would be implementation into Describe object to call something like Describe("data.dgn").docVer. The version is very quickly accesible from DGN drawing Properties in ArcCatalog, so it couldn't be too hard to get it in Describe object.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Or am I missing something? Is there a way to do that in Spatial ETL Tool in Data Interoperability?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for any help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Filip&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jan 2012 14:42:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-get-dgn-version-using-python/m-p/514041#M40346</guid>
      <dc:creator>FilipJung</dc:creator>
      <dc:date>2012-01-31T14:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to get DGN version using Python?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-get-dgn-version-using-python/m-p/514042#M40347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I will share how I finally solved this problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I easily encapsulated calling of tools in try, except:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;try: [INDENT]try: [INDENT]arcpy.importDgn7(...) arcpy.AddMessage(u"Data imported from DGN version 7.")[/INDENT] except: [INDENT]arcpy.importDgn8(...) arcpy.AddMessage(u"Data imported from DGN version 8.")[/INDENT][/INDENT] except: &amp;nbsp;&amp;nbsp; arcpy.AddMessage(u"Import failed for both DGN versions.")&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe this will be helpful to someone.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Filip&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2012 12:42:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-get-dgn-version-using-python/m-p/514042#M40347</guid>
      <dc:creator>FilipJung</dc:creator>
      <dc:date>2012-07-31T12:42:11Z</dc:date>
    </item>
  </channel>
</rss>

