Select to view content in your preferred language

Linking to often used code in Addins

845
2
07-04-2011 07:35 AM
DarrylDempsey
Emerging Contributor
Hope you had an enjoyable 4th July holiday Explorerer team.
I've developed a set of utilities whose code I regularly use in different addins.
At the moment I just copy and paste the code I need into each addin.

What would you folks suggest as the best way to link to commonly used code in Addins?
0 Kudos
2 Replies
AndreiIvanov
Deactivated User
Darryl,

there is an add-in published by Shelly that shows how add-ins can communicate with each other (http://forums.esri.com/thread.asp?t=297883&f=2208&c=184), though I think this is not necessary for what you do. I'd create a separate class with the utility code there, and just add this class to each add-in you develop.
0 Kudos
DarrylDempsey
Emerging Contributor
This is basically what I now do. However the utility consists of different classes which often reference each other so I have to copy the whole lot or fiddle about taking the bits I need.

I was wondering if there's a way (as in C, C++) to create a library (.lib) and statically link to this. Big plus is this only consumes the referenced compiled code and no worries about ending up in DLL hell ...
0 Kudos