HOW TO
A variant of type IUnknown must be used as a FilterShape in some development environments.
In Delphi:
Code:
vaPoly := OleVariant(filterShape);
layer.FilterOperator := moAreaIntersect;
layer.FilterShape := IUnknown(vaPoly);
In Visual C++:
Code:
VARIANT vShape;
VariantInit(&vShape);
vShape.vt = VT_UNKNOWN;
vShape.punkVal = filterShp.m_lpDispatch;
layer.SetFilterOperator(moAreaIntersect);
layer.SetFilterShape(vShape);
In Visual Basic simply write the shape into the FilterShape property.
Code:
layer.FilterOperator = moAreaIntersect
Set lyr.FilterShape = shp
Get help from ArcGIS experts
Download the Esri Support App