08-20-2013 01:53 AM - edited 08-20-2013 01:56 AM
Hi everyone,
I am plotting different Waveform channels on the same 2D Axis Systen Area in VIEW, but I don't know how to programmatically get information from it. Basically I would like to get the names or numbers of their respective X Channels and Y Channels when I click on them. Or, the name of the curve might be enough if it contains all of the information I need.
I am using DIAdem 11. I am already using a subroutine that refreshes every time I click somewhere, and it works perfectly, so you just have to focus on this particular problem, the rest is handled.
Thank you !
08-20-2013 08:13 AM
I received DIAdem 2012 today ! Joy ! I do not use DIAdem 11 anymore.
Hope that makes my problem easier.
08-21-2013 04:19 AM
Hello,
I am currently trying to programmatically know what curve is selected at the time the user clicks, but the following code never works:
Dim oMyCurve For Each oMyCurve in DisplaySheet.Areas(1).DisplayObj.Curves if (oMyCurve.Selected) then MsgBox("a") end if Next
Under DIAdem 11, no error nor message box appears.
Under DIAdenm 2012, the following error appears:"The value 1 is not a value of the enumeration."
I keep on trying to solve out my original problem , but it seems like there is always something unexpected. 😞
08-28-2013 06:06 PM
Hi Near,
Now that you have DIAdem 2012, you can click on the "Select Curve" icon above the graph and then hover over the curve-- you'll get a tip strip with the Y channel name:
Brad Turpin
DIAdem Product Support Engineer
National Instruments
08-29-2013 02:21 AM - edited 08-29-2013 02:25 AM
Hello Brad,
thank you for your answer. However, would you know a way to get the string inside that tip strip programmatically (so that I can then work from it) ?
I'm writing scripts for people, my job is to make theirs faster ^^
Thanks !
Additionnal comment: also, today is the last day of my internship. That would be kind of any of you if I could get some help quite shortly, from tomorrow on that will not be an issue for me anymore, though your answer will probably be looked for by the one that will replace me ^^
08-29-2013 10:13 AM
Hi Near,
If you're selecting the curve of interest in VIEW, that should set the Leading Curve for that graph, which you can access this way:
Set Graph = View.ActiveSheet.ActiveArea.DisplayObj Msg = Msg & Graph.LeadingCurve.XChannelName & vbCRLF Msg = Msg & Graph.LeadingCurve.YChannelName MsgBox Msg
I don't think there's an event for VIEW curve selection, though, so you'll have to fish out the curve info based on some other action, say a cursor movement. If the curve is using a Y channel that is a waveform, then you'll need to read out the waveform properties from the Y channel to get the X axis information. Let me know if you need help with that.
Brad Turpin
DIAdem Product Support Engineer
National Instruments