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

Measurement limits

Hi Guys,
Is there any method to set by macro the Measurements limits (eg Area min / Max)?
I need to change them dinamically during the macro execution.
I tried to do manually recording the operation but nothing has been saved in the macro editor.
Thank you

Best Answer

  • Accepted Answer
    Hi Maurizio,

    Yes, this command is recordable when you adjust ranges in the Edit range dialog.
    Here is my recorded macro:

        Public Function SetRanges() As SimpleScript
            SetRanges = New SimpleScript
            Dim doc1
            With Application.DocumentCommands.Active(SetRanges)
            End With
            With Measure.MeasurementsCommands.Options(SetRanges)
                .Segmentation.ApplyFilters = True
                .Segmentation.FilterRanges = New System.Collections.Generic.List(Of MeasFilterEntry)
                    .Segmentation.FilterRanges.Add( New MeasFilterEntry(eMeasures.RgnArea,201.150999790646R,792.57957015754R))
            End With
            With Measure.MeasurementsCommands.ApplyFilters(SetRanges)
            End With
        End Function


Sign In or Register to comment.