04-04-2009 10:40 PM
Hello Don,
Please see the attached code. I am tracking a couple of ActiveX events for the 3D Graph via event callback VIs. This will give you the rotation information that you are looking for.
All,
Does anybody have any ideas about breaking the exclusion between tracking the 3D Graph Cursor and tracking the Mouse Cursor Click Position?
If you set the track mode of the graph to "cwG3DTrackAllEvents" to track where the mouse was clicked (plot and point). But in this mode the graph does not respond to mouse drag, so you can't drag the Graph Cursors and you can not rotate, pan or zoom the graph. If you set the track mode to "cwG3DTrackZoomPanRotate", the graph works fine for tracking zoom, pan, rotate and Graph Cursor move, but doesn't track mouse cursor click position.
As for the issue about the mouse up event mentioned in my original post, here is what I've learnt so far.
The Graph generates a Mouse Up event if you just click on the graph.
If you drag and leave the mouse button, Mouse Up event is generated in the "cwG3DTrackAllEvents", but not in "cwG3DTrackZoomPanRotate"
Ravi Beniwal
P.S. I'm using LabVIEW 8.6
04-05-2009 09:46 AM
Hello Ravi:
Can you save / will this work in 8.5?
I have to release an executable in 8.5 and will be ugrading after that.
For now just using extra mouse click on graph like you said to get the updated orientation.....
Thanks,
Don
04-06-2009 07:11 AM
04-06-2009 09:54 AM
Hello Don,
Here's the code, saved for LabVIEW 8.5.
Let me know if you have any questions.
Ravi Beniwal
04-07-2009 11:58 AM
This looks awfully sweet.
What I have done preliminarily (since at the moment I am just interested in rotation info) is simplify the event structure quite extensively.
I just change the trackmode = cwG3DTrackZoomPanRotate on a mouse down event on surface graph and then rotate with mouse and the orientation is read as I rotate. Then really I don't think I even need the mouse up event at this point.
But your overall strategy is a good one because I can see needing the zoom and pan in the future.
Sincerely,
Don
04-08-2009 12:23 PM
One more interesting point about this. Even though the rotate triggers a change in the 'Rotate (New Orientation)' indicator, a value change event on this indicator is not fired. Yet I need such an event. Any reason why not - is it just related to the callback strategy approach?
My workaround is actually to use a 'Mouse Move' event which is triggered during the rotate (even though I did not think this event would be triggered since we are in the TrackZoomPanRotate trackmode).
Any thoughts?
Don
04-08-2009 01:53 PM
Hello Don,
The value change event doesn't fire when you change the value of any control or indicator programatically, using the "Value" property.
If you want the value change event to fire, please change the "Value" property in the Event Callback VI for Rotation Info to "Value (Signaling)".
Ravi Beniwal
04-08-2009 02:24 PM
Of course I was thinking of value signaling but how do you implement this (we are not talking a property node here)? It might be staring me in the face but can you mod the simple VI I have posted or post a screenshot to illustrate?
Thanks,
Don
04-08-2009 02:35 PM
04-08-2009 02:37 PM