OpenFeatureset(featureType, scope, useWindow)

Returns a featureset (the Featureset object) that contains features of the type featureType connected with records of the recordset. The Recordset::CanOpenFeatureset property (or Query::CanOpenFeatureset property) defines whether you can get a set of connected features. The type featureType must be linked with the root table of the query upon which the recordset has been built (the link descriptor based on the root table must belong to the FeatureType::DataLinks collection) or must be directly linked with the cataloged query of an external database (the link descriptor based on the cataloged query of external database must belong to the FeatureType::DataLinks collection). The scope argument specifies the scope of getting connected features and is defined by the following constants:

Constant

Scope of connected features

gdbScopeCurrentRecord

Returns a featureset that contains features connected with the current record of the recordset.

gdbScopeRecordset

Returns a featureset that contains features connected with any record of the recordset.

gdbScopeMarkedRecords

Returns a featureset that contains features connected with marked records in the recordset.

If the featureType belongs to a layer which belongs itself to a theme (i.e., belongs to the Theme::Layers collection), the optional logical argument useWindow determines whether to take into account the theme window (see method Theme::GetWindow) when building a featureset. If useWindow = True, the featureset will contain features of type featureType located inside or intersected with the theme window. If useWindow = False, the theme window is ignored when building the featureset. The default value of the argument useWindow is False. If the layer to which the featureType belongs does not belong to the theme (does not belong to the Theme::Layers collection), the useWindow argument is ignored. The recordset must be in the active state (see the Recordset::IsActive property).