Select to view content in your preferred language

Relation method in IRelationalOperator returns an exception

1946
0
09-05-2012 07:00 AM
GeoffJans
New Contributor
Hello,

I am trying to test a relation between two geometries, with the help of the "relation" method of the IRelationalOperator interface.
Here's the code that I am trying to run :

        Dim itfRelOpr As Geometry.IRelationalOperator

        itfRelOpr = CType(_objGeomt, Geometry.IRelationalOperator) ' The type of _objGeomt is IGeometry

        For Each ObjOcrn As T4E14Ocurn In objListeGeomt
            If itfRelOpr.Relation(ObjOcrn.Geometrie, "T********") Then  ' The type of ObjOcrn.Geometrie is IGeometry
                ...
            Else
                ...
            End If
        Next


The execution of the line containing the relation method results in an COM exception (System.Runtime.InteropServices.COMException (0x80004005)).

Anyone has an idea as to why that happens ?
0 Kudos
0 Replies