AnsweredAssumed Answered

IDataset FullName property always null

Question asked by jms143 on Mar 3, 2016
Latest reply on Mar 4, 2016 by YLiu-esristaff

I am triyng to access the FullName property of IDataset, but FullName is always null (incidentsDataset.FullName below)

 

Here is the code I'm using:

            IMxDocument mxdoc = ArcMap.Application.Document as IMxDocument;
            IMap map = mxdoc.FocusMap;
            IEnumLayer enumLayer = map.Layers;
            ILayer layer = enumLayer.Next();
            IFeatureLayer2 incidentsFLayer = null;

            while (layer != null)
            {
                if (layer.Name == "Incidents" && layer is IFeatureLayer2)
                {
                    incidentsFLayer = layer as IFeatureLayer2;
                }


                layer = enumLayer.Next();
            }

                IFeatureClass incidentsFC = incidentsFLayer.FeatureClass as IFeatureClass;
                IDataset incidentsDataset = incidentsFC as IDataset;
                IFeatureClassName incidentsFCName = incidentsDataset.FullName as IFeatureClassName;

 

Thanks.

Outcomes