CIMLayoutDocument.FromJson() error with Feature Service layer on Map

01-04-2021 05:56 PM
New Contributor III

I'm doing some layout modifications and rendering using the CIM. The process starts with the importation of an existing layout (the "template") by reading a pagx file into a JSON string. We then call CIMLayoutDocument.FromJson() to get an in-memory representation of the entire Layout and its components.

This has been working as expected until I added a Feature Service layer (a Polyline layer) to a Map referenced by the Layout in question. Since this Map is referenced by the Layout, it gets included in the list of CIMMaps in the CIMLayoutDocument.

With that feature service layer added, the call to CIMLayoutDocument.FromJson() produces an error, "Value was either too large or too small for an Int32."

All the stack trace shows is that this is the result of a call to System.Convert.ToInt32(). Is this a bug?

0 Kudos
1 Reply
by Esri Regular Contributor
Esri Regular Contributor

If you create a layout with a map that only contains that feature service layer you still get the error?  If so can you attach the json?  


0 Kudos