Home Image-Pro Plus Automation with Macros

Can anyone suggest how to insert a series of control images into a running batch at set intervals?


Can anyone suggest how to insert a series of control images into a running batch at set intervals? I'm having a few issues regarding inserting a series of control images into a batch being processed.

I think I need a loop counter, an open and process command, update data collector and return to where the batch left off. I cant get past the loop counter.

any help would be much appreciated.


  • Options
    Hi Sean,

    How do you run batch processing in IP Plus? You can use our sample script Batch_Process.ipm, which you can find in the Scrips folder of IPWIN installation. The script has some comments, so you can check how it works and modify for your needs.



  • Options
    Hi Yuri, 

    On IP plus 6.3 I use the batch process script with the process directory macro.

    currently it will run through my images and dump the data in the data collector which is fine, but i need to insert control images at regular intervals for quality assurance. 

    I've looked through the script comments and cant find anything to suggest how i can modify it in this way.

    Also there doesn't not seem to be a straight forward command for a loop counter in 6.3 is there a way round this?

  • Options

    Looping is done in while loop:

        While fName <> ""
        ' Print out the file name and its attributes
       Debug.Print GetAttr(gDirStart + fName); " "; fName
       ' Load the image
       docID = IpWsLoad(gDirStart + fName, "")
       ' Don't process if there is a failure loading
       If docID >= 0 Then
        ' Call processing routine here ***
        ' The document ID and file name are sent here 
        ' in case the processing routine needs them.
       DoStuff docID, gDirStart + fName
       ' Close the initial image
       ret = IpAppSelectDoc(docID)
       ret = IpDocClose()
    Debug.Print "Error loading "; gDirStart + fName
    End If
       ' Get the next file name
       fName = Dir()

    you can create your own indexing variable and control the count:

        Dim MyCounter as Integer
        While fName <> ""


Sign In or Register to comment.