<?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: Determining Workspace Type (ArcMap) in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/determining-workspace-type-arcmap/m-p/1260127#M66910</link>
    <description>&lt;P&gt;If you look at the helpfile on &lt;A href="https://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-functions/workspace-properties.htm" target="_self"&gt;describing a workspace&lt;/A&gt; it shows how to get finer granularity with workspace types using the property&amp;nbsp;&lt;EM&gt;workspaceFactoryProgID&lt;/EM&gt;.&lt;/P&gt;</description>
    <pubDate>Tue, 21 Feb 2023 17:30:36 GMT</pubDate>
    <dc:creator>DuncanHornby</dc:creator>
    <dc:date>2023-02-21T17:30:36Z</dc:date>
    <item>
      <title>Determining Workspace Type (ArcMap)</title>
      <link>https://community.esri.com/t5/python-questions/determining-workspace-type-arcmap/m-p/1258189#M66842</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to mass replace datasources. I have my dictionary, I have my general workflow, and initial testing is working fine on the test files I'm using, all of which are feature classes in file gdbs. I'd like to expand it to other file types.&lt;/P&gt;&lt;P&gt;Where I'm running into trouble is using&amp;nbsp;&lt;A href="https://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-mapping/layer-class.htm" target="_blank" rel="noopener"&gt;arcpy.mapping.replaceDataSource()&lt;/A&gt;&amp;nbsp;, specifically the workspace type parameter.&lt;/P&gt;&lt;P&gt;It seems that arcpy can't figure out the workspace type by itself, so we have to provide it.&lt;/P&gt;&lt;UL class=""&gt;&lt;LI&gt;&lt;EM&gt;ACCESS_WORKSPACE — A personal geodatabase or Access workspace&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;ARCINFO_WORKSPACE — An ArcInfo coverage workspace&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;CAD_WORKSPACE —A CAD file workspace&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;EXCEL_WORKSPACE —An Excel file workspace&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;FILEGDB_WORKSPACE —A file geodatabase workspace&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;NONE —Used to skip the parameter&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;OLEDB_WORKSPACE —An OLE database workspace&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;PCCOVERAGE_WORKSPACE —A PC ARC/INFO Coverage workspace&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;RASTER_WORKSPACE —A raster workspace&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;SDE_WORKSPACE —An SDE geodatabase workspace&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;SHAPEFILE_WORKSPACE —A shapefile workspace&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;TEXT_WORKSPACE —A text file workspace&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;TIN_WORKSPACE —A TIN workspace&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;VPF_WORKSPACE —A VPF workspace&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I thought that I could use arcpy.Describe on the workspace, &lt;A href="https://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-functions/workspace-properties.htm" target="_blank" rel="noopener"&gt;but that is less than ideal&amp;nbsp;&lt;/A&gt;:&lt;/P&gt;&lt;UL class=""&gt;&lt;LI&gt;&lt;EM&gt;FileSystem —File-based (coverage, shapefile, and so forth) workspaces and in-memory workspaces&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;LocalDatabase —Geodatabases that are local (a file or personal geodatabase)&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;RemoteDatabase —Geodatabases that require a remote connection (enterprise, OLE DB, and so forth)&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;As you can see, that gives me a very vague idea of what I'm working with.&lt;/P&gt;&lt;P&gt;I also thought that maybe I could Describe() on the new data sources themselves, but for example, a coverage just says "Coverage", rather than the coverage type.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Is there an easy way to determine workspace type?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 20:32:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/determining-workspace-type-arcmap/m-p/1258189#M66842</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2023-02-14T20:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Determining Workspace Type (ArcMap)</title>
      <link>https://community.esri.com/t5/python-questions/determining-workspace-type-arcmap/m-p/1259484#M66886</link>
      <description>&lt;P&gt;As an update to this, I solved my original question by just brute-forcing it. I run through a loop of possible workspace types until it works.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 19:06:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/determining-workspace-type-arcmap/m-p/1259484#M66886</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2023-02-17T19:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: Determining Workspace Type (ArcMap)</title>
      <link>https://community.esri.com/t5/python-questions/determining-workspace-type-arcmap/m-p/1260127#M66910</link>
      <description>&lt;P&gt;If you look at the helpfile on &lt;A href="https://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-functions/workspace-properties.htm" target="_self"&gt;describing a workspace&lt;/A&gt; it shows how to get finer granularity with workspace types using the property&amp;nbsp;&lt;EM&gt;workspaceFactoryProgID&lt;/EM&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 17:30:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/determining-workspace-type-arcmap/m-p/1260127#M66910</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2023-02-21T17:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Determining Workspace Type (ArcMap)</title>
      <link>https://community.esri.com/t5/python-questions/determining-workspace-type-arcmap/m-p/1271071#M67198</link>
      <description>&lt;P&gt;Thanks for the response.&lt;/P&gt;&lt;P&gt;I've looked at that property as well, but it doesn't actually give me what I'm looking for.&lt;/P&gt;&lt;P&gt;For example, that would return an empty string for things like Shapefiles, or even standalone rasters.&amp;nbsp;&lt;/P&gt;&lt;P&gt;It wasn't a big deal for ArcMap, but as I turn my attention to Pro with the absolutely awful updateConnectionProperties(), changing datasets requires you to know the workspace type.&lt;/P&gt;&lt;P&gt;Just testing so far, there are at least two types of workspace factory that are unaccounted for.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlfredBaldenweck_1-1679587133558.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/66092i45E2DDB92465B07A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AlfredBaldenweck_1-1679587133558.png" alt="AlfredBaldenweck_1-1679587133558.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is there a full list of potential types floating around somewhere?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 18:59:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/determining-workspace-type-arcmap/m-p/1271071#M67198</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2023-03-23T18:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: Determining Workspace Type (ArcMap)</title>
      <link>https://community.esri.com/t5/python-questions/determining-workspace-type-arcmap/m-p/1271278#M67205</link>
      <description>&lt;P&gt;Sounds like your research into the issue is good evidence for an &lt;A href="https://community.esri.com/t5/custom/page/page-id/arcgis-ideas" target="_self"&gt;ESRI Idea&lt;/A&gt;, to improve the list of identifiable workspace types?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2023 10:06:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/determining-workspace-type-arcmap/m-p/1271278#M67205</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2023-03-24T10:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: Determining Workspace Type (ArcMap)</title>
      <link>https://community.esri.com/t5/python-questions/determining-workspace-type-arcmap/m-p/1271495#M67213</link>
      <description>&lt;P&gt;Just posted an idea here:&amp;nbsp;&lt;A href="https://community.esri.com/t5/python-ideas/improved-documentation-for/idi-p/1271494/jump-to/first-unread-message" target="_blank" rel="noopener"&gt;Improved documentation for updateConnectionPropert... - Esri Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2023 18:50:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/determining-workspace-type-arcmap/m-p/1271495#M67213</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2023-03-24T18:50:51Z</dc:date>
    </item>
  </channel>
</rss>

