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
-
Hi Martin,
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
Pierre0 -
Many thanks 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 :With Capture.CaptureCommands.Acquire(Nothing) .Prompt = "Capturez l'image de " + objImage.Name + "______________ puis continuez" .Run(Nothing,image1) End With But the Prompt is not a part of this object. I want that the user see a prompt, do the job and when finished press "OK" on the prompt to continue the macro. I do this kind of prompt in measurement tool. With Measure.Measurements.ToolsCommands.Line(m_SimpleScript) .Prompt = "Mesurer la règle puis - OK" .Tool = eMMTool.Line .Interactive = True .Run(ThisApplication.ActiveImage) End With
thanks0 -
Martin,
If you need a non modal prompt, the easiest is to use an interaction command, see below.
PierreSub 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
0
Categories
- All Categories
- 961 Image-Pro v9 and higher
- 9 Image-Pro FAQs
- 18 Image-Pro Download & Install
- 448 Image-Pro General Discussions
- 486 Image-Pro Automation (Macros, Apps, Reports)
- 20 AutoQuant Deconvolution
- 2 AutoQuant Download & Install
- 18 AutoQuant General Discussions
- 195 Image-Pro Plus v7 and lower
- 3 Image-Pro Plus Download & Install
- 106 Image-Pro Plus General Discussions
- 86 Image-Pro Plus Automation with Macros
- 19 Legacy Products
- 16 Image-Pro Premier 3D General Discussions
- 26 Image-Pro Insight General Discussions