好,这是情况。我希望在ArcMap10.5上正确运行自定义的arcobjects vb.net扩展。在附件查看器中加载节点时,一旦调用Private Sub LoadNodes(),我将收到以下错误消息。
System.TypeLoadException:从COM对象扩展的类型应覆盖由基本COM类实现的接口的所有方法。
如果我从LoadNodes()中删除这些行,则不会得到System.TypeLoadException:并且该程序通过LoadNodes()运行,但是由于缺少附件表而明显失败了。
' Get relAttachments table and set selection table for it
Dim relAttach As ESRI.ArcGIS.Carto.StandaloneTable = New cAttachStandAloneTable(mFWS.OpenTable(modDBNaming.GetQualifiedTableName("RelAttachments", mFWS)), "FCName")
mRelAttachSel = relAttach
某种程度上,此问题与较新的环境有关,因为在旧环境中不会发生此问题。
当前环境: Visual Studio 13 .net Framework 4.5 ArcMap和Arcobjects 10.5(10.4存在相同问题)
旧环境: Visual Studio 8 .net Framework 3.5 ArcMap和ArcAobjects 10.2.2及更低版本
Private Sub LoadNodes()
Try
lblStatus.Text = "Populating the tree view with the database layers"
Me.Cursor = Windows.Forms.Cursors.AppStarting
' Get relAttachments table and set selection table for it
Dim relAttach As ESRI.ArcGIS.Carto.StandaloneTable = New cAttachStandAloneTable(mFWS.OpenTable(modDBNaming.GetQualifiedTableName("RelAttachments", mFWS)), "FCName")
mRelAttachSel = relAttach
' Load relAttachments into dataset datatable
PopulateRelAttachmentsTable(relAttach.Table)
Dim relAttachDV As DataView = New DataView(mDataset.Tables("relAttachments"))
' Clear out reachnodes hashtable
mReachNodes.Clear()
' Run through any selected features and store in table
If mStandAlone = False Then
PopulateSelectionTable()
End If
Dim selDV As DataView = New DataView(mDataset.Tables("Selection"))
' Clear the tree
tvStream.Nodes.Clear()