<?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 Possible bug in 10.0 with lyr's datasource in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/possible-bug-in-10-0-with-lyr-s-datasource/m-p/237057#M18428</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;While using ESRI's MultiMXDReport.py tool I noticed that the value returned using lyr.dataSource is wrong in all the MXDs where I manually changed data sources!&amp;nbsp; First off these are 9.3.1 MXDs edited with 9.3.1 ArcGIS Desktop.&amp;nbsp; We moved over to a new server so I went into each MXD and changed layer source through Properties | Source | Set Data Source.&amp;nbsp; We do have 10.0 sp2 on a PC so I decided to generate a report using MultiMXDReport.py to verfity that all layers are pointing to the correct data source.&amp;nbsp; Unfortunately, all the data sources kept their original values making it useless.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;LAYER: LN&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Group Layer Path:&amp;nbsp; Level 10-9 \LN&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Source:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C:\Documents and Settings\xxxxxxxxxx\Application Data\ESRI\ArcCatalog\PHSDev_ManagerAtPHSonDev.sde\PHS.DBO.WDFW_PHSPLUS_LN_SV&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dataset type:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Unknown (could be a broken data source) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Query Definition:&amp;nbsp; None &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Reference each layer in a data frame
lyrList = arcpy.mapping.ListLayers(mxd, "", df)
for lyr in lyrList:
&amp;nbsp;&amp;nbsp;&amp;nbsp; outFile.write("\n")
&amp;nbsp;&amp;nbsp;&amp;nbsp; outFile.write("\t\t LAYER: " + lyr.name + "\n")
&amp;nbsp;&amp;nbsp;&amp;nbsp; outFile.write("\t\t\t Group Layer Path:&amp;nbsp; " + lyr.longName + "\n")
&amp;nbsp;&amp;nbsp;&amp;nbsp; if lyr.supports("dataSource"):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outFile.write("\t\t\t Data Source:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " + lyr.dataSource + "\n")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outFile.write("\t\t\t Dataset type:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " + arcpy.Describe(lyr.dataSource).datasettype + "\n")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; except:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outFile.write("\t\t\t Dataset type:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Unknown (could be a broken data source) \n")
&amp;nbsp;&amp;nbsp;&amp;nbsp; else: outFile.write("\t\t\t Data Source:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N/A \n")&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Jun 2011 17:34:35 GMT</pubDate>
    <dc:creator>RandyKreuziger</dc:creator>
    <dc:date>2011-06-01T17:34:35Z</dc:date>
    <item>
      <title>Possible bug in 10.0 with lyr's datasource</title>
      <link>https://community.esri.com/t5/python-questions/possible-bug-in-10-0-with-lyr-s-datasource/m-p/237057#M18428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;While using ESRI's MultiMXDReport.py tool I noticed that the value returned using lyr.dataSource is wrong in all the MXDs where I manually changed data sources!&amp;nbsp; First off these are 9.3.1 MXDs edited with 9.3.1 ArcGIS Desktop.&amp;nbsp; We moved over to a new server so I went into each MXD and changed layer source through Properties | Source | Set Data Source.&amp;nbsp; We do have 10.0 sp2 on a PC so I decided to generate a report using MultiMXDReport.py to verfity that all layers are pointing to the correct data source.&amp;nbsp; Unfortunately, all the data sources kept their original values making it useless.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;LAYER: LN&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Group Layer Path:&amp;nbsp; Level 10-9 \LN&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Source:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C:\Documents and Settings\xxxxxxxxxx\Application Data\ESRI\ArcCatalog\PHSDev_ManagerAtPHSonDev.sde\PHS.DBO.WDFW_PHSPLUS_LN_SV&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dataset type:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Unknown (could be a broken data source) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Query Definition:&amp;nbsp; None &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Reference each layer in a data frame
lyrList = arcpy.mapping.ListLayers(mxd, "", df)
for lyr in lyrList:
&amp;nbsp;&amp;nbsp;&amp;nbsp; outFile.write("\n")
&amp;nbsp;&amp;nbsp;&amp;nbsp; outFile.write("\t\t LAYER: " + lyr.name + "\n")
&amp;nbsp;&amp;nbsp;&amp;nbsp; outFile.write("\t\t\t Group Layer Path:&amp;nbsp; " + lyr.longName + "\n")
&amp;nbsp;&amp;nbsp;&amp;nbsp; if lyr.supports("dataSource"):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outFile.write("\t\t\t Data Source:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " + lyr.dataSource + "\n")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outFile.write("\t\t\t Dataset type:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " + arcpy.Describe(lyr.dataSource).datasettype + "\n")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; except:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outFile.write("\t\t\t Dataset type:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Unknown (could be a broken data source) \n")
&amp;nbsp;&amp;nbsp;&amp;nbsp; else: outFile.write("\t\t\t Data Source:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N/A \n")&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2011 17:34:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/possible-bug-in-10-0-with-lyr-s-datasource/m-p/237057#M18428</guid>
      <dc:creator>RandyKreuziger</dc:creator>
      <dc:date>2011-06-01T17:34:35Z</dc:date>
    </item>
  </channel>
</rss>

