ArcMap

Bind and License your standalone ArcGIS Engine or Desktop application

At ArcGIS 10 you can bind your standalone application to an Engine or Desktop runtime and license your application by making a single call to BindLicense.

Here are the 2 steps:

  1. Reference the ESRI.ArcGIS.Version assembly
  2. Call ESRI.ArcGIS.RuntimeManager.BindLicense(ProductCode.EngineOrDesktop) before calling any ArcObjects code or creating any of the ArcGIS Engine Controls. So a good place for this would be in the main entry point of the application

[STAThread]
static void Main()
{
if (!RuntimeManager.BindLicense(ProductCode.EngineOrDesktop))
{
MessageBox.Show(“Unable to bind to ArcGIS runtime. Application will be shut down.”);
return;
}
Application.Run(new Form1());
}

Firstly, this BindLicense method will try to Bind to an Engine Runtime, but if unavailable it will try to bind to a Desktop Runtime. Secondly, it will license the application with the lowest license level available (in the order of ArcGIS Engine, ArcView, ArcEditor, ArcInfo).

For more advanced binding and licensing options please refer to:

 

 

Content provided by Gayle Young

 

Next Article

Drawing a Blank? Understanding Drawing Alerts in ArcGIS Pro

Read this article