public override void OnUpdate() { base.OnUpdate(); Enabled = false; //single item check if (Application.SelectedItems.Count > 1 || Application.SelectedItems.Count == 0) return; // check for table MapItem mapItem = Application.SelectedItems.GetFirst(); if (mapItem is PackageLayer) { PackageLayer pkLayer = mapItem as PackageLayer; Enabled = pkLayer.HasTable; } else if (mapItem is PackageChildLayer) { PackageChildLayer pkChildLayer = mapItem as PackageChildLayer; Enabled = pkChildLayer.HasTable; } else if (mapItem is FeatureLayer) Enabled = true; }
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.