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

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
Ciao
Maurizio

Best Answer

  • Options
    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)
                .Run(doc1)
            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))
                .Run(doc1)
            End With
    
            With Measure.MeasurementsCommands.ApplyFilters(SetRanges)
                .Run(doc1)
            End With
    
        End Function
    

    Regards,

    Yuri
Sign In or Register to comment.