lyrx, mapx from folder connection

569
2
Jump to solution
09-23-2020 09:33 PM
by Anonymous User
Not applicable

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
by Anonymous User
Not applicable

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
by Anonymous User
Not applicable

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
GKmieliauskas
Esri 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