gp工具的许可

Posted yansc

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了gp工具的许可相关的知识,希望对你有一定的参考价值。

技术分享图片

还是要在代码里许可

    static class Program
    {
        [STAThread]
        static void Main()
        {            ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.EngineOrDesktop);
            IAoInitialize aoInitialize = new AoInitialize();
            esriLicenseStatus licenseStatus = esriLicenseStatus.esriLicenseUnavailable;
            licenseStatus = aoInitialize.Initialize(esriLicenseProductCode.esriLicenseProductCodeAdvanced);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }
    }

比如

        IGeoProcessorResult ret = null;
        private void button1_Click(object sender, EventArgs e)
        {
            string sInputPath = @"x:aa	est	est320902.gdbDLGXZDW";
            string sOutPutPath = @"x:aa	est	est320902.gdbDLGXWM_BUFFER_BAK";
            ESRI.ArcGIS.AnalysisTools.Buffer pBufferTool = new ESRI.ArcGIS.AnalysisTools.Buffer();
            pBufferTool.in_features = sInputPath;
            pBufferTool.out_feature_class = sOutPutPath;
            pBufferTool.buffer_distance_or_field = "BufferKD";
            pBufferTool.dissolve_option = "ALL";
            pBufferTool.line_side = "FULL";
            pBufferTool.line_end_type = "FLAT";
            Geoprocessor gp2 = new Geoprocessor();
            gp2.OverwriteOutput = true; 
            gp2.ToolExecuted += Gp2_ToolExecuted;   
            ret = gp2.ExecuteAsync(pBufferTool);
        }

        private void Gp2_ToolExecuted(object sender, ToolExecutedEventArgs e)
        {
            MessageBox.Show(ret.GetMessage(0));
        }

  

以上是关于gp工具的许可的主要内容,如果未能解决你的问题,请参考以下文章

Android onRequestPermissionsResult 不适用于我的片段

arcgis服务之GP服务的几点问题(附GP服务发布步骤)

版本 4.1.6 中的 iTextSharp(具有先前的许可条件)

在arcengine里面如何用GP工具实现addjoin .用C#

GP工具环境变量名称列表

ArcEngine——异步执行GP工具(Background geoprocessing)