LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Scene Window Events

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?

0 Kudos
Message 1 of 7
(3,330 Views)

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:

user event.png

 

I hope this helps,

John McLaughlin
Academic Account Manager
National Instruments UK & Ireland
0 Kudos
Message 2 of 7
(3,311 Views)

Hi John,

 

I am reasonably familiar with LabVIEW Events, the CLA in my signature stands for Certified LabVIEW Architect Smiley Wink

 

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.

Message 3 of 7
(3,305 Views)

@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.

0 Kudos
Message 4 of 7
(3,288 Views)

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,

John McLaughlin
Academic Account Manager
National Instruments UK & Ireland
0 Kudos
Message 5 of 7
(3,251 Views)

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.

 

John McLaughlin
Academic Account Manager
National Instruments UK & Ireland
0 Kudos
Message 6 of 7
(3,245 Views)

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.

 

Message 7 of 7
(3,211 Views)