Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I obtain the coordinates from an active X IMAQ container from use in another part of a vi?

Is their a simple way to read the screen coordinates from the IMAQ Active X container produced by the example NI code IMAQ_vi.llb so I can use them in another part of a program?

Many thanks

Nick
0 Kudos
Message 1 of 6
(3,418 Views)
Is this LabVIEW or LabWindows? In LabVIEW, you should be able to create a property node and get the position of the window. I'm not sure about LabWindows.

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 6
(3,418 Views)
Thanks for the answer. I'm using Labview 6i. And what I need to do is get the cursor coordinates of a point on which I click within the image displayed in the ActiveX placeholder. Hope this is bit clearer

Thanks

Nick
0 Kudos
Message 3 of 6
(3,418 Views)
What is confusing me is the ActiveX reference. Are you using a non-standard display, or are you assuming it is ActiveX? The standard display (WindDraw) is not ActiveX as far as I know.

To get a cursor coordinate within the WindDraw window, use IMAQ WindLastEvent. You can input that you are looking for mouse clicks. The output will tell you where the last mouse click was.

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 4 of 6
(3,418 Views)
Thakns agian for the reply. The display is contained within an ActiveX container in the front panel. I'm using the code as is that you can downlaod from

http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3EAC556A4E034080020E74861&p_node=DZ52505&p_source=external

I want to keep the display within the front panel and the probelm with the standard didplay is WindDraw creates a new window.

Thanks again

Nick
0 Kudos
Message 5 of 6
(3,418 Views)
I haven't used the VB ActiveX window. I always use "Make Child" to embed the IMAQ window in the front panel.

If you are using LV 7, the latest IMAQ has a built-in window which would probably solve your problem.

I suspect there is an ActiveX property in there somewhere that will give you what you want, but I don't know where.

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 6 of 6
(3,418 Views)