Home Image-Pro Automation (Macros, Apps, Reports)
Options

CODE to return the number of SELECTED FEATURES . . .

2017-08-08-100611

All --

What CODE can I use to learn the number of SELECTED FEATURES in an IMAGE.

In the IMAGES below I would like the CODE to show me the SELECTED FEATURES for

    A = 0
    B = 2
    C = 4

Thanks in advance.

-- Matt

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-


Best Answer

  • Options
    Answer ✓
    Hi Matt,

    Select features are in SelectedSubFeatures collection, here is the macro that prints Count:
        Public Sub PrintSelectedCount
            Dim md As McMMData=ThisApplication.ActiveImage.MeasurementsData
            Debug.Print md.SelectedSubFeatures.Count
        End Sub
    
    

    Yuri

Answers

  • Options
    2017-08-08-120959

    Yuri --

    Thank you for your reply and the the CODE within.

    -- Matt
Sign In or Register to comment.