<?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: Inconsistencies and missing information when parsing CIM objects in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/inconsistencies-and-missing-information-when/m-p/1415215#M11427</link>
    <description>&lt;P&gt;The spatial reference is actually the exact same. Its the same source map and the same source geometry.&lt;/P&gt;</description>
    <pubDate>Thu, 25 Apr 2024 10:11:22 GMT</pubDate>
    <dc:creator>marco_vertigis</dc:creator>
    <dc:date>2024-04-25T10:11:22Z</dc:date>
    <item>
      <title>Inconsistencies and missing information when parsing CIM objects</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/inconsistencies-and-missing-information-when/m-p/1414620#M11420</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I digged a bit deeper into the behaviour of map graphics and their CIM representation in a MapDocument and LayerDocument and found probably some bugs or atleast inconsistencies when working with them.&lt;/P&gt;&lt;P&gt;The map graphic binary reference is lost when parsing a .mapx file back to a CIMMapDocument instance.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;// map needs to have a graphic layer with graphics ofc
map.SaveAsFile("C:\\temp\\temp.mapx", true);
var json = File.ReadAllText("C:\\temp\\temp.mapx");
var mapDoc = CIMMapDocument.FromJson(json);
// BUG :: BinaryReference.Object is null. Should be instance of CIMElementStorage
var binaryRefs = mapDoc.BinaryReferences.Where(br =&amp;gt; br.Object is CIMElementStorage).ToList(); // returns none&lt;/LI-CODE&gt;&lt;P&gt;Same behaviour can be observed when doing this with a .lyrx file.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var layerDoc = new LayerDocument(graphicLayer);
layerDoc.Save("C:\\temp\\temp.lyrx");
// The .lyrx file contains the CIMElementStorage object
var json = File.ReadAllText("C:\\temp\\temp.lyrx");
// BUG: BinaryReference.Object (CIMElementStorage) is null, although it does exist in the .lyrx file json
var cimLayerDoc2 = CIMLayerDocument.FromJson(json);&lt;/LI-CODE&gt;&lt;P&gt;This two are probably just some parsing errors but the last one just does not make any sense to me.&amp;nbsp;If I get the CIMLayerDocument in memory the CIMElementStorage object exists, but somehow the coordinates of the different graphic geometries are manipulated/odd in comparison when I do a proper save to .lyrx file.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var layerDoc = new LayerDocument(graphicLayer);
// BUG: The resulting geometries within the CIMElementStorage have completely different geometries, see image below
// geometries are broken
var cimLayerDoc = layerDoc.GetCIMLayerDocument();
// geometries are ok
layerDoc.Save("C:\\temp\\temp.lyrx");&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Left the geometry saved as .lyrx and right the in memory create CIMLayoutDocument. The source is exactly the same.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="difference-save-to-lyrx-and-inmemory.PNG" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/101969iCFC62B1858A98B88/image-size/large?v=v2&amp;amp;px=999" role="button" title="difference-save-to-lyrx-and-inmemory.PNG" alt="difference-save-to-lyrx-and-inmemory.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any explanations or hints on this would be appreciated!&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 11:05:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/inconsistencies-and-missing-information-when/m-p/1414620#M11420</guid>
      <dc:creator>marco_vertigis</dc:creator>
      <dc:date>2024-04-24T11:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistencies and missing information when parsing CIM objects</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/inconsistencies-and-missing-information-when/m-p/1414707#M11421</link>
      <description>&lt;P&gt;Weird. I wonder if the coordinate system used between both formats is different?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 13:43:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/inconsistencies-and-missing-information-when/m-p/1414707#M11421</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2024-04-24T13:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistencies and missing information when parsing CIM objects</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/inconsistencies-and-missing-information-when/m-p/1414830#M11424</link>
      <description>If you found a repeatable inconsistency, I would encourage you to place a bug report with Esri. That is the only way to get this addressed. The bug is either in the help documents for the LayerDocument(graphicLayer) object OR an unexplained behavior in the CIMLayerDocument object.&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Apr 2024 16:03:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/inconsistencies-and-missing-information-when/m-p/1414830#M11424</guid>
      <dc:creator>RichardDaniels</dc:creator>
      <dc:date>2024-04-24T16:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistencies and missing information when parsing CIM objects</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/inconsistencies-and-missing-information-when/m-p/1415215#M11427</link>
      <description>&lt;P&gt;The spatial reference is actually the exact same. Its the same source map and the same source geometry.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2024 10:11:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/inconsistencies-and-missing-information-when/m-p/1415215#M11427</guid>
      <dc:creator>marco_vertigis</dc:creator>
      <dc:date>2024-04-25T10:11:22Z</dc:date>
    </item>
  </channel>
</rss>

