internal static bool IsLayerFileValid(IGxLayer pGxLayer) { ICompositeLayer pCompositeLayer = null; IGroupLayer pGroupLayer = new GroupLayerClass(); ILayer pLayer = null; IEnumLayer pEnumLayer = null; try { if (!(pGxLayer.Layer is IGroupLayer)) { if (pGxLayer.Layer.Valid == false) { return false; } } else { //pGroupLayer = pGxLayer.Layer as IGroupLayer; pCompositeLayer = pGxLayer.Layer as ICompositeLayer; for (int counter = 0; counter < pCompositeLayer.Count; counter++) { pLayer = pCompositeLayer.get_Layer(counter); if (pLayer.Valid == false) { return false; } } } return true; } catch (Exception ex) { MessageBox.Show(ex.Message); return false; //throw; } }
James,I got pulled away from this project and have not gotten back to it because now my boss wants to do this in Python instead of C# and I'm not the Python programmer in our group.Sorry I couldn't be of more help.Carlos
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.