jsn

How to run a Modelbuilder scripf in ArcMap only for selected features

Discussion created by jsn on Jun 22, 2012
Latest reply on Jun 22, 2012 by jsn
Hi all

I just created a ModelBuilder model that counts the records in a feature class.

If I do not select any specific feature in the feature class and run the count it counts all the records, I was expecting a count equal to zero.

If I select a few features in the feature class and run the count it counts ONLY the records selected.


How can I check that the feature has no records selected.


In .Net it can be done checking  the SelectionSet

'Get the selection set

    Dim pFSel As IFeatureSelection

    Dim pSelSet As ISelectionSet

    Set pFSel = pFLayer

    Set pSelSet = pFSel.SelectionSet

    if pSelSet.Count > 0   
          process records     ..........


thanks

Outcomes