ArcEngine license初始化
public static void ESRILicense()
{
ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.EngineOrDesktop);
IAoInitialize mAoInitialize = new AoInitialize();
esriLicenseStatus licenseStatus = (esriLicenseStatus)mAoInitialize.IsProductCodeAvailable(esriLicenseProductCode.esriLicenseProductCodeAdvanced);
if (licenseStatus == esriLicenseStatus.esriLicenseAvailable)
{
if (licenseStatus != esriLicenseStatus.esriLicenseCheckedOut)
licenseStatus = (esriLicenseStatus)mAoInitialize.Initialize(esriLicenseProductCode.esriLicenseProductCodeAdvanced);
if (licenseStatus != esriLicenseStatus.esriLicenseCheckedOut)
{
throw new Exception(“初始化ArcGIS Engine失败”);
}
}
else
{
throw new Exception(“没有ArcGIS Engine许可”);
}
}
转载自:https://blog.csdn.net/u013751758/article/details/79346236