Heads up, looks like 100.8 has introduced a new MMPK problem, centered around GetLegendInfosAsync. As soon as I can isolate the problem and set up a working example, I'll get it off to tech support. Has anyone else seen this yet?
"Cannot call this method in this context: Object failed to load, unable to execute task."
This is only happening with a particular MMPK and not the others I work with, so I wouldn't be surprised if it's a symbology issue.
Solved! Go to Solution.
Mark,
We still have further investigation to do, but I wanted to give you an update with what we know so far:
The problem appears to be due to the presence of an instance of the color type `CIMHSLColor` where currently we expect `CIMRGBColor`.
This information may allow you modify your map to choose an appropriate RGB color in ArcGIS Pro and repackage. Color—ArcGIS Pro | Documentation.
Specifically the layers containing symbols with this color type are the two annotation layers:
- OH Fiber Optic Anno
- UG Fiber Optic Anno
I'll update you with more information when available.
Thanks
Mike
Does the same mmpk with the same code work with the 100.7 release?
Yes, works fine at 100.7.
If you can provide the mmpk file I would be interested to test it.
It's big, about 600M. I've been busy with other issues today, but tomorrow I'll see if I can come up with a smaller, simpler example.
FYI, I was able to trace the error to two empty annotation classes. However, there's another empty annotation class, and also other annotation classes with no problems. I created a small MMPK with just a few features, and a simple Visual Studio project that duplicates the problem. Attached.
I was able to reproduce the issue with your annotation layers but not with my own empty annotation layers. I'm thinking the issue is originating somewhere in how the annotation layers were created. Do you know of any differences in how yours that are giving the error were created compared to how the one you have that works was created?
I did note that yours had a lyr.MinScale and lyr.MaxScale of "NaN" while mine were 0 and that yours has a red font symbology embedded?
I've been scratching my head about it; I'm dealing with bookoo layers over multiple MMPKs, and all I did was set them up in manually Pro to match the original ArcMap MXDs, because direct imports in earlier versions of Pro led to other problems. I do have an open tech support case now, #02555784. I can upload Pro projects, mapx files, data, whatever through FTP for that case.
Mark,
We still have further investigation to do, but I wanted to give you an update with what we know so far:
The problem appears to be due to the presence of an instance of the color type `CIMHSLColor` where currently we expect `CIMRGBColor`.
This information may allow you modify your map to choose an appropriate RGB color in ArcGIS Pro and repackage. Color—ArcGIS Pro | Documentation.
Specifically the layers containing symbols with this color type are the two annotation layers:
- OH Fiber Optic Anno
- UG Fiber Optic Anno
I'll update you with more information when available.
Thanks
Mike
I have verified that updating the annotation class symbols works around the problem. It requires a data model change, however. Substituting a color without changing the data model doesn't work.