1

I am trying to use arcobjects with vb.net to validate a topology (already defined). I am caught even when I use the sample provided by ESRI.

The code I use for accessing a topology is:

Dim topoUiD As UID = New UIDClass
topoUiD.Value = "esriEditorExt.TopologyExtension"
Dim topologyExt As ITopologyExtension = CType(m_application.FindExtensionByCLSID(topoUiD),      ITopologyExtension)
Dim topology As ITopology
topology = CType(topologyExt.CurrentTopology, ITopology)

The code I use for selecting errors is as follow:

topologyExt.ClearActiveErrors(esriTEEventHint.esriTENone)
topologyExt.DelayEvents(True)
While Not ((topoError = eErrorFeat.Next) Is Nothing)
    topologyExt.AddActiveError(topoError, esriTEEventHint.esriTENone)
End While
topologyExt.DelayEvents(False)

I get the following errors:

(1) ITopologyExtension is not declared

(2) esriTEEventHint is not declared

I want to check what is missing in the code? Is it the arcObjects library, if yes, what library should be used.

I am a beginner in arcObjects. Please help me on it, thanks.

1 Answer 1

1

iTopologyExtension interface is part of the ESRI.ArcGIS.EditorExt namespace, so you need to import this namespace at the top of your module (and also check it is added to references):

Import ESRI.ArcGIS.EditorExt

Or if you don't want to import, just reference iTopologyExtension in full:

Dim pTopoExt As ESRI.ArcGIS.EditorExt.ITopologyExtension

I think esriTEEventHint may be recognised when you import the namespace (although I could be wrong).

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.