Error: Run-time error '445' - Object doesn't support this action

Error Message

When using the IRelationalOperator::Equals method on a geometry bag, ArcMap returns the message, "Run-time error '445' - Object doesn't support this action".


This is a known issue. This method is not implemented yet.

Solution or Workaround

The code below demonstrates how to work around this issue programmatically. This code is an example only. It is not complete and will cause an error if you try to run it.

'If you have a geometry bag
Dim pGeometryBag As IGeometryCollection
Set pGeometryBag = New GeometryBag

'And you add some geometries to this bag
pGeometryBag.AddGeometry pPt
pGeometryBag.AddGeometry pPolygon

'The work around can be:
*Create IEnumGeometry Interface
Dim pGeomEnum As IEnumGeometry

*Set that inteface to the geometry bag
Set pGeomEnum = pGeometryBag

*Create a geometry interface
Dim pGeom As IGeometry
Dim count As Integer

*Create the relational operator
Dim pRelOperator As IRelationalOperator

*Loop in your geometry enumeration and
*extract each geometry and compare with
*another geometry

For count = 1 To pGeomEnum.count
Set pGeom = pGeomEnum.Next
Set pRelOperator = pGeom
MsgBox CStr(pRelOperator.Equals(pPt(0), vbOKOnly)