Select to view content in your preferred language

cannot use "Application.FindExtensionByCLSID(pID)" "application" - not found

582
1
11-20-2011 12:36 AM
matthewandreatta
Deactivated User
Hi all, migrating some VBA code to VB dotnet in an addin for arcmap 10.  Using visual studio 2010.

This line
pEditor = Application.FindExtensionByCLSID(pID)

give this error
Error 8 'FindExtensionByCLSID' is not a member of 'System.Windows.Forms.Application'.

Is there a reference missing? I have tried "My.ArcMap.Application.Document" but cannot get to the findextension.

Any suggestion.

Thanks
0 Kudos
1 Reply
RichardFairhurst
MVP Alum
Hi all, migrating some VBA code to VB dotnet in an addin for arcmap 10.  Using visual studio 2010.

This line
pEditor = Application.FindExtensionByCLSID(pID)

give this error
Error 8 'FindExtensionByCLSID' is not a member of 'System.Windows.Forms.Application'.

Is there a reference missing? I have tried "My.ArcMap.Application.Document" but cannot get to the findextension.

Any suggestion.

Thanks


Assuming this is being built as an Add-in for ArcMap you should be able to use:

pEditor = ArcMap.Application.FindExtensionByCLSID(pID)

or

pEditor = My.ArcMap.Application.FindExtensionByCLSID(pID)


I also assume you have created a reference to Editor and Imported it already, but since you don't show the code that sets up the pEditor variable or the pID variable, I can't tell.
0 Kudos