<?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 Access Project-File (.aprx) using the SDK in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/access-project-file-aprx-using-the-sdk/m-p/1118054#M7364</link>
    <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;I am currently looking into the possibilty of accessing a ArcGIS Pro Project from the "outside" using the ArcGIS Pro SDK.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I mean by that is that is that I don't want to access the "current" project using an AddIn, but instead use the Core-Assembly to access the content of a project from the outside, similar to what arcpy does by using soemthing like this:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;aprx = arcpy.mp.ArcGISProject(r"Path_to_my_project\project.aprx")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;During my own research I could not find anything about it, so I wanted to make sure that its not possible by posting my question here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks in advance!&lt;/P&gt;</description>
    <pubDate>Thu, 18 Nov 2021 07:34:18 GMT</pubDate>
    <dc:creator>Kai_DA</dc:creator>
    <dc:date>2021-11-18T07:34:18Z</dc:date>
    <item>
      <title>Access Project-File (.aprx) using the SDK</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/access-project-file-aprx-using-the-sdk/m-p/1118054#M7364</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;I am currently looking into the possibilty of accessing a ArcGIS Pro Project from the "outside" using the ArcGIS Pro SDK.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I mean by that is that is that I don't want to access the "current" project using an AddIn, but instead use the Core-Assembly to access the content of a project from the outside, similar to what arcpy does by using soemthing like this:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;aprx = arcpy.mp.ArcGISProject(r"Path_to_my_project\project.aprx")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;During my own research I could not find anything about it, so I wanted to make sure that its not possible by posting my question here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks in advance!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 07:34:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/access-project-file-aprx-using-the-sdk/m-p/1118054#M7364</guid>
      <dc:creator>Kai_DA</dc:creator>
      <dc:date>2021-11-18T07:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: Access Project-File (.aprx) using the SDK</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/access-project-file-aprx-using-the-sdk/m-p/1118545#M7367</link>
      <description>&lt;P&gt;The aprx file is a zip file containing xml which can be deserialized as CIM objects.&amp;nbsp; Last I checked this is also "core" in the sense that it can be run with dotnet core (apparently no license initialization required).&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;private static void Test()
{
    string aprxFile = @"D:\ArcPro_Projects\Naperville\Naperville.aprx";
    using (ZipArchive archive = System.IO.Compression.ZipFile.OpenRead(aprxFile))
    {
        foreach (var entry in archive.Entries
            .Where(e =&amp;gt; !e.FullName.StartsWith("Metadata/"))
            .Where(e =&amp;gt; e.FullName.EndsWith(".xml")))
        {
            try
            {
                using (var strm = new StreamReader(entry.Open()))
                {
                    var xml = strm.ReadToEnd();
                    var obj = CIMObject.FromXml(xml);
                    Debug.Print($"type: {obj}");
                }
            }
            catch(Exception ex)
            {
                Debug.Print($"error {entry.FullName} : {ex.Message}");
            }
        }
    }
}&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 19 Nov 2021 04:24:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/access-project-file-aprx-using-the-sdk/m-p/1118545#M7367</guid>
      <dc:creator>KirkKuykendall1</dc:creator>
      <dc:date>2021-11-19T04:24:20Z</dc:date>
    </item>
  </channel>
</rss>

