public class TestNewDoc : ESRI.ArcGIS.Desktop.AddIns.Button { protected override void OnClick() { ArcMap.Application.OpenDocument("Normal.mxt"); IGxLayer gxLayer = new GxLayerClass(); IGxFile gxFile = (IGxFile)gxLayer; gxFile.Path = "C:\\temp\\layer.lyr"; ArcMap.Document.AddLayer(gxLayer.Layer); } }
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.