AnsweredAssumed Answered

Pro update broke ability to add .lyrx to map

Question asked by kbmeinstein on Aug 1, 2018
Latest reply on Aug 1, 2018 by kbmeinstein

My code adds a layer file (.lyrx) to the map. Up to now, this was working fine as follows:

 

Uri myUri = new Uri(C:\<path to .lyrx>\mySymbology.lyrx);

Layer newlayer = LayerFactory.Instance.CreateFeatureLayer(myUri, MapView.Active.Map, LayerPosition.AddToTop);

 

Then yesterday, ArcGIS Pro popped up a message saying there was an update available, so I installed it.  Silly me - I thought this would fix bugs!  Now the above code no longer works.  It gives me an error that says "Failed to add data, unsupported data type".  Is there some other way to programmatically add a .lyrx file to the map?  Or is this a bug that has been introduced?  I really need for this to work.

Outcomes