lyrx, mapx from folder connection

297
2
Jump to solution
09-23-2020 09:33 PM
ThanHtetAung_EsriAu
Esri Regular Contributor

Hi Guys,

I would like to know that is there any way to load layers info/data source info from lyrx/mapx directly from catalog folder connection?
And then update the data source location dynamically from ArcGIS pro sdk or pro python, may be driven from the dockpane UI?
Or is that even possible?

Because in ArcMap development with arcobject or arcpy, we can do these by using IWorkspace object.

Believe that underlying sdk is using arcobject, I think it should be possible?

Uma Harano‌ , Wolfgang Kaiser ?‌

0 Kudos
1 Solution

Accepted Solutions
ThanHtetAung_EsriAu
Esri Regular Contributor

Hi Guys,

Currently I managed and load from Json function with map document and layer document.

From there I manage to update the datasource.

View solution in original post

0 Kudos
2 Replies
ThanHtetAung_EsriAu
Esri Regular Contributor

Hi Guys,

Currently I managed and load from Json function with map document and layer document.

From there I manage to update the datasource.

0 Kudos
GintautasKmieliauskas
Regular Contributor

Hi Than,

Have you taken a look at Esri Content\ExcelDropHandler sample? It has method :

private static async Task ModifyLayerSymbologyFromLyrFileAsync(FeatureLayer featureLayer, string layerFile)

It applies lyrx to featurelayer, but it is possible to create layer from lyrx ant then update CIMDataConnection. If you still interested ask me and I will describe second process more detailed.

0 Kudos