10-25-2010 03:26 PM
Hi All,
Anybody know if it is possible to use events with an external Scene Window? Specifically I am looking for Mouse events.
Thanks
n
ps: is it just me or is the documentation on the 3D picture control severely lacking?
10-26-2010 05:19 AM
Hi nrp,
It sounds like you are looking for event driven programming. You can find out more about them from here: User Events
In particular you are looking for mouse events. This can be done, much like the example shown below that will display a sphere on the front panel when the mouse goes into it:
I hope this helps,
10-26-2010 06:07 AM
Hi John,
I am reasonably familiar with LabVIEW Events, the CLA in my signature stands for Certified LabVIEW Architect
My question is related to events with the Scene Window (i.e. the spawned window you can create with the 3D picture control). I want to be able to respond to events in this newly spawned window, not the VIs Front Panel.
10-26-2010 09:19 AM - edited 10-26-2010 09:20 AM
@JohnMc19 wrote:
I hope this helps...
The image above shows an event structure dropped into what appears to be a polling loop. It's atypical to see a terminal wired to the Stop condition, and a Wait inside a loop with an Event Structure.
10-27-2010 05:17 AM
I believe I misunderstood the original question, sorry for that.
At the moment I can't see a way of using mouse events on the rendered window pop-up you get when a VI is run with 3D picture tools.
There is not a lot of documentation on this topic but maybe it is an opportunity for you to add to the LabVIEW Idea Exchange.
I will continue to look for a past example on a rendered window affected by events in the mean-time.
Thanks,
10-27-2010 05:50 AM
Have you looked through the code in the 'solarsystem.vi' found in NI Example Finder.
It allows you to control movements within the render window using the mouse.
10-28-2010 07:02 AM
Hi John,
Thanks, yes I have disected the solar system example and a few others. These are useful entry points to starting to figure out the API.
In that example you can indeed control the camera with the mouse, but this seems to be built in to the window itself, and not exposed at the LabVIEW code level. I want to be able to react to button clicks and get the mouse coordinates and things like that.
There is a nice example in 2010 where you can "pick" an object in an embedded control by clicking on it. I want to try and do this in the Scene Window as well.