How to export commandbar to esriaddin

727
1
10-16-2013 12:14 AM
A_Kipfer
New Contributor
Hello,

I'm developing with VS 2010 and C# for ArcGIS 10.0.

I created a custom commandbar and added custom buttons to it. I'm wondering now if it's possible to export it to a proper commandbar.dll and commandbar.tlb. I need to do it at runtime.

As I understood, I can generate a .dll with CodeDomProvider but I don't know if I can pass a commandbar object to it, from the documentation I read I can't tell. Then it would be possible to use regasm commandbar.dll /tlb:commandbar.tlb to create a tlb file, at least theoretically, I'm not sure if this would work. So I have the following questions:

1. Is exporting a programmatically created commandbar to an esriaddin-bundle feasible at all?
2. If so, can anyone please give me a hint on how to do that or how to use CodeDomProvider (yes, I found examples but not on passing an object).

Thanks very much in advance!
Kianar
0 Kudos
1 Reply
swapnabhide
New Contributor
Hi Kianar,

As per ESRI ArcObjects Help, there is only manual way to add the existing custom command to the add-in and there is no utility to automatically perform this task. You can refer below link for more details:

How to migrate from COM components to add-ins (refer 'About migrating from COM components to add-ins' section)
http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//0001000003z6000000

Hope this answers your query.

Regards,
Swapna.
0 Kudos