Capture image automation
Hi,
I'm still working on some conversion of IPP7 automation to IPP9.1
On my development desktop I have no camera installed, so I'm running in Camera Simulation. I don't know if it's the cause of my problem but when I try to Record some execution I'm always getting an unexpected error. The recording is working great anywhere else except in "Capture ribbon".
Well, to do simple, I have 3 steps that I'm looking to convert...maybe somebody can point me on the good command in IPP9.1
I'm still working on some conversion of IPP7 automation to IPP9.1
On my development desktop I have no camera installed, so I'm running in Camera Simulation. I don't know if it's the cause of my problem but when I try to Record some execution I'm always getting an unexpected error. The recording is working great anywhere else except in "Capture ribbon".
Well, to do simple, I have 3 steps that I'm looking to convert...maybe somebody can point me on the good command in IPP9.1
ret = IpAcqShow(ACQ_LIVE, 1) ret = IpMacroStop("Capture image for animal XXXX then continue.",0) ret = IpAcqSnap(ACQ_NEWEX) ret = IpAcqShow(ACQ_LIVE, 0)
Thanks in advance. Martin
0
Answers
There's a bug in capture recording which will be addressed in the next Premier release. Here is a macro that does what you need.
Sub SnapImage Dim image1 With Capture.CaptureCommands.Preview(Nothing) .PreviewOn = True .Run(Nothing,image1) End With MsgBox("Capture image for animal XXXX then continue.",vbInformation Or vbOkOnly,"Capturing...") With Capture.CaptureCommands.Acquire(Nothing) .Run(Nothing,image1) End With With Capture.CaptureCommands.Preview(Nothing) .PreviewOn = False .Run(Nothing,image1) End With End Sub
Pierre
The MsgBox is not really what I need at this point.
I rather need a "Prompt" that is not modal.
I tried something like this :
thanks
If you need a non modal prompt, the easiest is to use an interaction command, see below.
Pierre
Sub SnapImage Dim image1,doc1 With Capture.CaptureCommands.Preview(Nothing) .PreviewOn = True .Run(Nothing,image1) End With With Application.DocumentCommands.Active(Nothing) .Run(doc1) End With With Automate.ScriptingCommands.Interaction(Nothing) .Interactive = True .Prompt = "Capture image for animal XXXX then continue." .Text = "Capture" .Run(doc1, Nothing) End With With Capture.CaptureCommands.Acquire(Nothing) .Run(Nothing,image1) End With With Capture.CaptureCommands.Preview(Nothing) .PreviewOn = False .Run(Nothing,image1) End With End Sub