Arcobjects is the underlying API for ArcGIS, built on COM technology, so it can naturally support C++,VB. NET, and many other languages. However, because it is COM based, its APIs are difficult to use (as compared to the. Net framework). I've been using it for some time, but I've always had some annoying little problems with it. In that case, write them down and share them with us.
The system environment I use is Windows 7 64-bit, Visual Studio 2010, and ArcGIS 9.3/10.
Of course, for projects that use Arcobjects, first set the build target platform for X86in the project properties (taking into account the 64-bit development environment and the operating environment).
Visual Studio 2010 references to all arcobjects have the default set of embedded interop types: True,
So you don't see the-class suffix behind the component class in my Code.
Please use Visual Studio 2008 or later to add the-class suffix to your classmates.
Before invoking the other Arcobjects APIs, you first have to initialize the license:
Using System;
Using ESRI. Arcgis.esrisystem; ESRI. ArcGIS.System.dll
//using ESRI. arcgis.version;
Omitting several lines of
static void Initialize ()
{
//ARCGIS10 requires binding product code
//runtimemanager.bind ( Productcode.engineordesktop);
Initialize AO license
var aoi = new Aoinitialize ();
var s = Aoi. Initialize (
esrilicenseproductcode.esrilicenseproductcodeenginegeodb);
if (s = = esrilicensestatus.esrilicenseunavailable)
throw new NotSupportedException ("requested permission not available");
}
ArcGIS 10 has a new Runtimemanger(included in the ESRI.ArcGIS.Version, this DLL is also new), before initializing AO must call its Bind method, bind the corresponding product.
In addition,Esrilicenseproductcode is generally set to engine, when you need to visit Geodatabase, you have to set Enginegeodb (of course, if you have the license of the GEODB).