How to access dataset from .lyr file in ArcGIS Pro SDK?

1228
2
06-06-2017 11:54 AM
PaoloSucci1
New Contributor

Hi All,

I have a file folder with multiple .lyr files accessed in an Arc VB.NET add-in. I can add each of these to the focused map, but I'd like to show previews of the datasets in the custom window I built.

I'm wondering if it's possible to access dataset information (such as a list of fields, data type, projection, geographic preview, etc.) from a .lyr with the ArcGIS Pro SDK.

As I understand, the only way I could do it is to first add the layer to the Map using LayerFactory, then find the layer within the Map and access it that way. I'd like to avoid this process as it's inefficient. Alternately, can I create the layer in virtual memory? (e.g. create it using LayerFactory, but not add it to the map just so I have a layer with an associated dataset).

Thanks in advance!

Tags (2)
0 Kudos
2 Replies
CharlesMacleod
Esri Regular Contributor

There is no API for unloaded layer files.

PaoloSucci1
New Contributor

Well I guess that settles it then. Thanks!

0 Kudos