AnsweredAssumed Answered

Accessing COM custom extension from add-in

Question asked by RomCoh on Nov 20, 2014



I made an add-in (,net 3.5 , ArcMap v.10.2) that contains a button.

From this button I try to access to a custom COM Extension class, that implements IExtension.

From other COM classes I just do the following:


var extUID = new UIDClass {Value = "<CustomExtensionName>"
return ArcMap.Application.FindExtensionByCLSID(extUID) as <CustomExtension>


and it works fine.


When I try to use this function from add-in, I get IExtension, but when I try to cast is to my custom Extension class I just get null or InvalidCastException..


Can someone help me?