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



All --

Is there a way from CODE to change the IMAGE FILE that is used by the CAPTURE SIMULATION FEATURE?

I have have a folder with about 60 images that are a Z SERIES that I would like to open via the CAPTURE MODULE instead of doing a FILE OPEN.

If my CODE knows what SIMULATION IMAGE would make sensed to pump through the CAPTURE MODULE, is there a way to set this up?

I recorded the act of changing this setting and nothing when into NEWMACRO.

I am currently doing this with FILE OPEN COMMANDS but I am working to get the CAMERA STUFF up and running with no camera connected.

Thank you in advance for your assistance on this.

-- Matt

Best Answer

  • Answer ✓
    Hi Matt,

    Yes, the following references and imports should be added:


    Best regards,


  • Hi Matt,

    The following function will allow you to programmatically change the simulation file.

        Public Function Sim_File(FilePath As String) As SimpleScript
            Sim_File = New SimpleScript
            Dim SimFileAttr As McCaptDevAttribute
            With Capture.CaptureCommands.GetAttribute(Nothing)
                '.AttrID = mcCaptAttrIDs.mcatImageFilePath
                .AttrID = 135
                SimFileAttr = .Attribute
            End With
            If SimFileAttr IsNot Nothing Then
                SimFileAttr.Value = FilePath
            End If
        End Function
  • 2018-11-13-105835

    Trey --

    Thank you for that information.

    I will attempt to wire that in to my code the next time I open it up.

    Is there an IMPORT / REFERENCE / DEPENDENCY that needs to be set up to support anything within the FUNCTION SIM_FILE?


    -- Matt

  • 2018-11-16-094600

    Trey --

    Thank you very much for the CODE and the IMPORTS which support it.

    -- Matt

  • 2022-05-11-174603

    Trey --

    I am working to use the CODE you provided above with

        IP 10.0.11

    I am getting an the error shown below.

    It looks like the WORKBENCH does not like

    I tried to change it to


    but that did not solve the problem

    The PROJECT IPP FILE includes the IMPORTS that you recommended as shown here.

    Can you help me resolve this issue so my CODE can set the CAMERA SIMULATION FILE in IP10.0.11 please?


    -- Matt

Sign In or Register to comment.