<?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: Changing map document data source from File Geodatabase to Sqlite using arcpy in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/changing-map-document-data-source-from-file/m-p/744720#M19806</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You posted your question under ARCOBJECTS group you should be posting this under PYTHON group&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Nov 2019 14:40:29 GMT</pubDate>
    <dc:creator>DuncanHornby</dc:creator>
    <dc:date>2019-11-04T14:40:29Z</dc:date>
    <item>
      <title>Changing map document data source from File Geodatabase to Sqlite using arcpy</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/changing-map-document-data-source-from-file/m-p/744719#M19805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to write an arcpy script which will allow me to change the layers of a map document to point from a file geodatabase to a sqlite database with the same table names and data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was able to use the following to migrate from a gdb to a sql server database:&lt;/P&gt;&lt;P&gt;import arcpy&lt;/P&gt;&lt;P&gt;mxd = arcpy.mapping.MapDocument(r"C:\test\mytestmap.mxd")&lt;/P&gt;&lt;P&gt;mxd.replaceWorkspaces(r"C:\test\src.gdb","FILEGDB_WORKSPACE",r"C:\test\dest.sde","SDE_WORKSPACE")&lt;/P&gt;&lt;P&gt;mxd.SaveACopy(r"C:\test\newmap.mxd")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to do the same with this code:&lt;/P&gt;&lt;P&gt;import arcpy&lt;/P&gt;&lt;P&gt;mxd = arcpy.mapping.MapDocument(r"C:\test\mytestmap.mxd")&lt;/P&gt;&lt;P&gt;mxd.replaceWorkspaces(r"C:\test\src.gdb","FILEGDB_WORKSPACE",r"C:\test\dest.sqlite","SDE_WORKSPACE")&lt;/P&gt;&lt;P&gt;mxd.SaveACopy(r"C:\test\newmap.mxd")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried to use the destination workspace as SDE_WORKSPACE,FILEGDB_WORKSPACE, and&amp;nbsp; TEXT_WORKSPACE, but i only get "ValueError: MapDocObject: Unexpected error"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there another way to do this work or am I missing a step?&amp;nbsp; I need to do a batch of documents and will need to do it again in the future, so a script is the best way to proceed, if I can.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2019 16:36:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/changing-map-document-data-source-from-file/m-p/744719#M19805</guid>
      <dc:creator>StevenPaplanus</dc:creator>
      <dc:date>2019-10-24T16:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: Changing map document data source from File Geodatabase to Sqlite using arcpy</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/changing-map-document-data-source-from-file/m-p/744720#M19806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You posted your question under ARCOBJECTS group you should be posting this under PYTHON group&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2019 14:40:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/changing-map-document-data-source-from-file/m-p/744720#M19806</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2019-11-04T14:40:29Z</dc:date>
    </item>
  </channel>
</rss>

