Académique Documents
Professionnel Documents
Culture Documents
htm
ArcGIS SDK
Samples
How to use the .NET samples
This topic discusses compiling .NET solutions and registering .NET components with COM. For more information on adding and
removing ArcGIS application customizations, please see How to use the COM samples.
Compiling .NET Solutions
Plugging .NET Components into ArcGIS Applications
1 of 2 5/27/2011 11:50 PM
How to use the samples http://edndoc.esri.com/arcobjects/9.0/Samples/HowToUseDotNetSamples.htm
You can register a .NET solution with COM manually using RegAsm.exe which is part of the .NET SDK. The following command
line shows an example.
regasm EditTools.dll /tlb:EditTools.tlb /codebase
[Guid("74b3d982-e4ae-4817-8315-6f025cc270df")]
public sealed class AngleAngleTool: BaseTool
{
[ComRegisterFunction()]
static void Reg(String regKey)
{
MxCommands.Register(regKey);
}
[ComUnregisterFunction()]
static void Unreg(String regKey)
{
MxCommands.Unregister(regKey);
}
If the sample you are working with does not have these functions you must manually register the sample in the appropriate
component category use Categories.exe.
Fore more information on using Categories and adding and removing items from the ArcGIS applicstions, see How to use the
COM samples and the documentation on using Categores.exe.
2 of 2 5/27/2011 11:50 PM