ArcEngine控制台应用程序许可设置

1、引用

using ESRI.ArcGIS.esriSystem;

2、代码

//运行时环境的绑定
ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.EngineOrDesktop);
//AO的许可级别判断
IAoInitialize aoInitialize = new AoInitializeClass();
esriLicenseStatus licenseStatus aoInitialize.Initialize(esriLicenseProductCode.esriLicenseProductCodeStandard);
if (licenseStatus != esriLicenseStatus.esriLicenseCheckedOut)
{
       Console.WriteLine("Unable to check-out an ArcInfo license, error code is {0}", licenseStatus);
       return;
}

你可能感兴趣的:(ArcEngine控制台应用程序许可设置)