AnsweredAssumed Answered

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

Question asked by succip on Jun 6, 2017
Latest reply on Jun 7, 2017 by succip

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!

Outcomes