Select to view content in your preferred language

Add-in custom editor extension does not show in the toolbar

5292
4
11-19-2015 12:10 PM
JoseSanchez
Frequent Contributor

Hello everyone,

I am working on an AddIn in Vb.net using the sample "AddInEditorExtension" as a template and now that I finished it I do into see in ArcMap in the toolbar or in ArcMap Extensions list the name of the Add-In.

ArcObjects Help for .NET developers

I would like to know how a user can enable or disable the AddInextension.

Where can I find the name of this AddIn other than in the Add-In list.

Thank you

0 Kudos
4 Replies
OwenEarley
Frequent Contributor

Depending on the type of functionality you have built you may need to register the component.

Many of these customizations can be built and deployed as add-ins, while others require development of custom components...

The following table shows the various editor customization types and their supported customization methods:

Customization type

Add-in

Component

Commands

Yes

Yes

  • Context menus
YesYes
ToolsYesYes
  • Construction tools

Yes

Yes

Extensions

Yes

Yes

Shape constructors

No

Yes

Tasks

No

Yes

Object inspectors

No

Yes

Snap agents

No

Yes

Edit sketch extensions

No

Yes

- ArcObjects Help for .NET developers

Custom components require the old style COM registration before ArcGIS will load them.

There is more information in the help in the Extending ArcObjects section:

0 Kudos
FreddieGibson
Honored Contributor

Have you tried hooking into the extension and setting its state?

How to use extensions

http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#//00010000033w000000

You can get the guid for the extension by calling ThisAddIn.IDs.<NameOfYourExtensionClass> within the addin code where the extension lives.

0 Kudos
JoseSanchez
Frequent Contributor

Hi,

I am using the same functionality that comes on this project. Please feel free to download it to take a closer look.

ArcObjects Help for .NET developers

it does not need to be registered.

0 Kudos
FreddieGibson
Honored Contributor

Editor extensions will not display in the Extensions list of ArcMap. For example, the Editor in ArcMap is actually an extension named "Esri Object Editor". If you open the Extensions dialog you'll see that this name doesn't appear there. An editor extension essentially hooks into this extension to enable/disable itself.

I would suggest two workflows if you're needing to be able to turn this extension on/off.

  1. Use a regular Extension instead of an Editor Extension. Both are implemented in the same manner (i.e. when the application or editor starts you wire your code into events where you need to implement your logic). With the regular Extension you'd be able to expose your custom extension in the ExtensionDialog. This would allow users to be able to enable/disable your extension from the ArcMap UI. You could also use the link I posted before to automate this process by wiring into other events throughout the system.

    How to use extensions
    http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#//00010000033w000000

  2. Use an Editor Extension. This extension will be treated as a JIT extension. You'd need to cycle through the JITExtensionManager to hook into your edit extension. Once you've located it you could call its  OnStartup or OnShutdown methods to essentially turn your logic on or off.

    How to find an extension
    http://edndoc.esri.com/arcobjects/9.2/net/ee7dc655-6908-4c1a-bc30-374903916520.htm

I only had a few minutes to write this up...so below is what I was able to create and test. This appears to be working for me so far. You'd need to implement the logic to control when to call Startup or Shutdown and you'd also need to setup the needed wiring within both of these methods.

jit.png

0 Kudos