wallage Posted February 10, 2010 Report Share Posted February 10, 2010 I have a 3d plot with a cursor in it. Depending on the cursor's x-position I want a certain calculation to be performed. I already have an event structure to handle other controls on the front panel and now I want to have an event, which is trigger when the cursor in the 3d graph is dragged/dropped. However I don't know how to make this. Does anyone know how to do this? thanks. Quote Link to comment
Ninou Posted February 18, 2010 Report Share Posted February 18, 2010 (edited) I have a 3d plot with a cursor in it. Depending on the cursor's x-position I want a certain calculation to be performed. I already have an event structure to handle other controls on the front panel and now I want to have an event, which is trigger when the cursor in the 3d graph is dragged/dropped. However I don't know how to make this. Does anyone know how to do this? thanks. only x-position or also y-position? Can you post an example of calculation? ninou Edited February 18, 2010 by Ninou Quote Link to comment
wallage Posted February 18, 2010 Author Report Share Posted February 18, 2010 (edited) only x-position or also y-position? Can you post an example of calculation? ninou Hi Ninou, The calculation doesn't really matter. Lets say I have an indicator on my frontpanel which displays the value of the x-position of the cursor. The value of the indicator must be updated each time the cursors x-position changes. This is just an illustrative scenario but the updating of the indicator must be done in an event-structure and not in a while loop. here are the frontpanel and diagram: Edited February 18, 2010 by wallage Quote Link to comment
wallage Posted February 23, 2010 Author Report Share Posted February 23, 2010 I have temporarily solved the afore mentioned problem by adding a timeout trigger to the event structure. The is fine as long as the 3d graph is not to complicated. However if the graph is getting more complicated drawing the graph every time the timeout counter expires will be a great load on the CPU. This was why I was looking for a better solution then using the timeout in the first place. Quote Link to comment
Francois Normandin Posted February 24, 2010 Report Share Posted February 24, 2010 Hi Wallage, you could use the "Mouse Up" event for the 3D Graph. However, when I tested it with LV2009, it worked only with the Right-Click or Center-Click mouse button. The left button "Mouse Up" event doesn't get fired. The Left-Click works only with the new OOP 3D Graph... if you've got LV2009. <object id="scPlayer" width="756" height="524"> <param name="movie" value="http://content.screencast.com/users/normandinf/folders/Jing/media/8ef0769a-5721-413b-848a-109c51b0f733/jingswfplayer.swf"></param>'>http://content.screencast.com/users/normandinf/folders/Jing/media/8ef0769a-5721-413b-848a-109c51b0f733/jingswfplayer.swf"></param> <param name="quality" value="high"></param> <param name="bgcolor" value="#FFFFFF"></param> <param name="flashVars" value="thumb=http://content.screencast.com/users/normandinf/folders/Jing/media/8ef0769a-5721-413b-848a-109c51b0f733/FirstFrame.jpg&containerwidth=756&containerheight=524&content=http://content.screencast.com/users/normandinf/folders/Jing/media/8ef0769a-5721-413b-848a-109c51b0f733/LeftClick.swf"></param> <param name="allowFullScreen" value="true"></param> <param name="scale" value="showall"></param> <param name="allowScriptAccess" value="always"></param> <param name="base" value="http://content.screencast.com/users/normandinf/folders/Jing/media/8ef0769a-5721-413b-848a-109c51b0f733/"></param>'>http://content.screencast.com/users/normandinf/folders/Jing/media/8ef0769a-5721-413b-848a-109c51b0f733/"></param> <embed src="http://content.screencast.com/users/normandinf/folders/Jing/media/8ef0769a-5721-413b-848a-109c51b0f733/jingswfplayer.swf" quality="high" bgcolor="#FFFFFF" width="756" height="524" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="thumb=http://content.screencast.com/users/normandinf/folders/Jing/media/8ef0769a-5721-413b-848a-109c51b0f733/FirstFrame.jpg&containerwidth=756&containerheight=524&content=http://content.screencast.com/users/normandinf/folders/Jing/media/8ef0769a-5721-413b-848a-109c51b0f733/LeftClick.swf" allowFullScreen="true" base="http://content.screencast.com/users/normandinf/folders/Jing/media/8ef0769a-5721-413b-848a-109c51b0f733/" scale="showall"></embed> </object> Quote Link to comment
wallage Posted February 24, 2010 Author Report Share Posted February 24, 2010 Hi francois, Thanks for you reply. I have tried your suggestion but my program hangs up because the "mouse up" event is not handled in my other event structure. Even when I add a new case which does handle a "mouse up" event. Could this be because the "mouse up" event is also triggered when I press (and release) a button on the frontpanel? The "change value" event for that button is triggered as well as the "mouse up" event. 2 events at the same time mich cause a hang up of the program? best regards, arjen Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.