AnsweredAssumed Answered

Replacement for extending AddIns.Extension

Question asked by lbross_pdxedu on Nov 22, 2019
Latest reply on Dec 6, 2019 by lbross_pdxedu

With ArcMap AddIns, I extended the AddIns.Extension class to create a custom extension as a central repository to store states and variables that were relevant to different workflows in my AddIn. For example: the currently selected area of interest. To access the custom extension from any workflow in the AddIn, I used the Application.FindExtensionByCLSID() method. Is there a recommended design pattern for centrally storing this type of information in ArcGIS Pro?


Friend Shared Function GetExtension() As BagisPExtension
  ' Extension loads just in time, call FindExtension to load it.
  If s_extension Is Nothing Then
    Dim extID As UID = New UID()
    extID.Value = My.AddInID
  End If
Return s_extension
End Function