Set cursor to a plotted point
Hi everybody,
here is what I wanted to do but I have no idea how to:
I have an XYGraph with a lot of data point inside (they all belong to one plot).
Now I want to click at one of the points to select it.
Of course, I have to use a cursor. All what I could do is dragging the
cursor (snapped to the plot) around but I want to do this by a click
and the cursor should
go to the point.
Is there no simple way?
Thanks for help.
Ronny
Here is a solution :
- detect the click position using an event structure,
- calculate the corresponding coordinates (a "tricky" step, where you need to play with the X and Y scale positions...),
- move the cursor to the nearest graphed point (snap-to-point mode).
A better positionning can be obtained using the marker coordinates to get a better definition of the plot area origin, but this is not usually required.
Enjoy...
Chilly Charly (aka CC)
E-List Master - Kudos glutton - Press the yellow button on the left...
Attachments:
Spot.vi 58 KB
Similar Messages
-
How do I set cursor.index to anywhere in the graph array?
I am using LV 8.5.1 and feeding an XY graph with an X-Y array of data. Only a section of the array is displayed on the graph. I have a cursor (single-plot).
I would like to set Cursor.Index property node of the cursor associated with the plot to the maximum index value of the graphed array regardless of the XScale range. I don't seem to be able to do it. I cannot set it beyond a certain number. When I rescale the graph I have a new maximum number. Is this what should happen?
To get around this, I am momentarily setting the XScale.ScaleFit property to 1, which then allows me to set Cursor.Index to maximum (I then immediately reduce my scale range appropriately). I am having to do this before every occurrence of setting the Cursor.Index in case the new setting exceeds the currently allowed maximum value. Just seems a bit clunky.
Thanks for any help.This is no longer a problem. My data is too big to feasibly be fed into a graph so am having to chop it up and use my own index pointer.
-
How Do You Move Cursor To Another Plot?
I have a couple of plots I am working with. How do I move the Cursor (programmatically) from one plot to the next?
I have tried assigning the "Plot" to the cursor and using SnapToPointOnPlot, but it does no good.
You can set the snapmode to SnapToNearestPoint and drag the cursor there (that works), but I need to do it programmatically.The following code demonstrates what you want to do. The form should have a 2D Graph (CWGraph1), a DSP control (CWDSP1), and a command button. Your difficulty may have been in (not) using the Set statement to assign a plot to the cursor. The VB lines of particular interest are in bold.
Private Sub Command1_Click()
Dim phase
Dim x
Dim y
'Create one sine wave
phase = 0
x = CWDSP1.SineWave(128, 1, 0.01, phase)
'Create a second sine wave
phase = 30
y = CWDSP1.SineWave(128, 1, 0.01, phase)
'Remove any plots from graph
CWGraph1.Plots.RemoveAll
'Plot one
CWGraph1.PlotY x
'This line prevents the next call to PlotY from overwriting the first plot.
CWGraph1.Plots(1).MultiPlot = False
CWGraph1.PlotY y
'I added a cursor interactively, so it already exists on the graph.
'Tell the cursor to snap to points on a specific plot
CWGraph1.Cursors(1).SnapMode = cwCSnapPointsOnPlot
'Tell the cursor which plot to snap to. You MUST use a Set statement because
' CWGraph1.Plots(1) references an object (in this case a plot object.)
Set CWGraph1.Cursors(1).Plot = CWGraph1.Plots(1)
'Put the cursor at index 64 of the plot data.
CWGraph1.Cursors(1).PointIndex = 64
MsgBox "asdf"
'Attach the cursor to the second plot.
Set CWGraph1.Cursors(1).Plot = CWGraph1.Plots(2)
'Put the cursor at index 32 of the plot data.
CWGraph1.Cursors(1).PointIndex = 32
End Sub
I hope this helps,
David -
Set cursor in a specific view of transaction MM01/MM02
Hi,
We have to check a condition in the user-exit EXIT_SAPLMGMU_001, for transaction MM01/MM02, and if the condition fails the client wants to set the cursor in a specific field from a specific view. Is it possible? I tried to use the sentence SET CURSOR referenced to a remote program but it doesn't work.
Does anybody knows how to solve this problem?
Thanks in advance
Regards
MaribelHi
I hope, you have read the documetation attached with this Standard Enhancement - MGA00001.
EXIT_SAPLMGMU_001
Where Is the Customer Exit - EXIT_SAPLMGMU_001 called?
The customer exit is in function module MATERIAL_UPDATE_ALL. The
function module checks the data for errors (logical relationships,
foreign keys, fixed domain values, and so on) when the material master
is updated.
Use
o New fields
You can make checks possible for new fields of your own. These
checks must be identical to the checks that you carry out for your
new fields in online maintenance.
o Existing fields
For existing fields, you can extend and intensify the checks.
You can also change data for descriptions and general material data
(MARA). For example, the descriptions can be generated from attributes
of the material.
Limitations
You cannot bypass existing checks.
Interface to Application
The respective data of the current logical transaction is contained in
the structures, for example, in structure WMARA for MARA. Nonrelevant
structures are transferred with their initial values.
General material data that can be changed (CMARA) has the structure
MARU. This MARA view contains fewer internal fields than MARA itself. If
WMARA is filled, CMARA is also filled when accessed.
The customer exit contains the exception APPLICATION_ERROR for your
self-defined error situations.
Using the language element MESSAGE .. RAISING APPLICATION_ERROR, you can
terminate the current (logical) transaction and display your message in
the log.
Also, I guess, have you put some code in the Includes available with the EXITS and then activated the Project in CMOD.
<b>Reward points</b>
Regards -
Xy graph in PDA module does not plot points or update
The XY Graph for PDA does not plot points or update. Input data is simple cluster of floating point data (x,y)in while structure. The axes scale properly with Configure PDA XY Scales.vi. Cursor legend also OK. Checked line and point attributes-OK. Running 7.0F1 and pocketPC2003. Please help.
Garret,
Can you attach the VI so that we can see it? If you think it is a bug in the toolkit, rather than a programing thing I would suggest sending an e-mail to NI. In addition are you using eVT 3 or 4 or both? -
hey guys,
MODULE PAI_CHECK.
MODIFY MYTAB FROM LTAB INDEX ZTABDISP-CURRENTLINE transporting KUNRR STATUS.
SET CURSOR FIELD 'LTAB-KUNNR'
MESSAGE E005.
END MODULE.
does not allow me to put cursor at KUNNR field, instead
it stands in first column itself..
what could be the reason here..
ambichanTry setting the cursor field in the PBO.
If this is to point the user at the error which is occuring, then it should happend automatically if you are coding it correctly.
This statement should actually be in its own module.
MODIFY MYTAB FROM LTAB INDEX ZTABDISP-CURRENTLINE transporting KUNRR STATUS.
The checks should be in their own modules.
MODULE CHECK_KUNNR.
IF ltab-kunnr is initial.
message E005.
endif.
ENDMODULE.
In your flow logic, in the PAI, you should be coding your checks like this.
LOOP AT LTAB.
MODULE YOUR_MODIFY_STATEMENT.
FIELD LTAB-KUNNR MODULE CHECK_KUNNR.
ENDLOOP.
Regards,
Rich Heilman -
Hi experts,
I want to position the cursor in a screen field.
I gave SET CURSOR FIELD GS_ASSEMBLY-SERNR in PAI.
But still the cursor is not in required position.
Pls help me to do this.
Thanks.Hi Murugan ....
in the screen example 100- > in <b>Attribute's tab</b> ( first tab ) there is Other Attriubutes block which is 3rd selection screen in the screen..
<b>Exactly below the <b>Next Screen</b> field that is the <b>Cursor position</b> .
<b>for setting the cursor on the screen</b>
<b>there do the F4</b> it will show the <b>list of the fields which are all declared in the screen by you ..</b>
<b>just select the field</b> ..... inwhich field you want to set the cursor .</b>then <b>activate</b> it ... execute and see ...
the cursor will be there on the cursor selected field .
reward points if it is usefull ...
Girish -
Bode magnitude graph cursor not following plot
Hi,
I was wondering if anyone would be able to shed some light on a problem that I am having regarding an XY graph cursor.
I have developed a simple VI to determine the characteristics of a low pass filter using a sine wave ramped in frequency and subsequently monitoring the gain of the filter to create a Bode plot.
Through analysis of the Bode plot I would like to determine the cut-off frequency of the low pass filter under test. I have introduced a cursor into the graph and using a property node I hoped to drive the cursor to the -3dB point in the Y axis and output the cursors corresponding X position thereby determining the cut-off frequency of the filter.
However the cursor never seems to follow the plot beyond the first step of the loop. It feels as if there is a break in the plot between the 1st and 2nd iteration of the while loop used to ramp the signal generator.
I've tried to work out why the cursor won't follow the plot to -3dB but so far I am stumped.
Any help or advice that you could provide would be greatly appreciated ! I have provided the attached VI for clarity.
So liberate your minds and give your soul expression. Open up your hearts, I'll sing for you this song. Let the people sing !
Solved!
Go to Solution.
Attachments:
LPF Auto Test.vi 109 KBI have corrected your VI.
First, you needed to put the property node AFTER the while loop, because you need the graph to be done first and then look at the frequency cut off.
Second, in LV, the property nodes are read from top to bottom. So you need to place the cursor at Y = -3 first, and then read the X position.
I attached the corrected vi
Giuliano Franchetto
Student at the l'Ecole Nationale Supérieure des Mines de Saint-Etienne, cycle ISMIN (FRANCE)
Attachments:
LPF Auto Test.vi 109 KB -
Hello!
I'm using 3D plot block. I've inserted a cursor,each point of the plot has a name i want that the cursor show this name.
I've seen that the cursor of 3D plot shows you the coordinates of the point. How i can catch the value of the cursor...in 2D plot i use property node to obtain this value, but i have no idea if it is possible.
I need this information strongly.
Thanks!The 3D cursor name can be accessed using a property node, in a way very similar to thre 2D cursor. Except that it is more difficult to access the proper property node. The attached vi shows how to do it.
Chilly Charly (aka CC)
E-List Master - Kudos glutton - Press the yellow button on the left...
Attachments:
3D cursor name.vi 67 KB -
How to SET CURSOR FIELD my_field in my_REPORT_PROG.?
Hi Experts,
If the user do not enter a value in one field( NOT mandatory field) on the selection screen of my_report_prog. I wanna,
1- To throw message - am getting by throwing as STATUS message
2 - wanna keep CURSOR on that particlar field in order to input the value by the user - am using SET CURSOR FILED my_filed----
> but NOT working????????
So, pls. let me know that How to get it done?
thanqhi,
try the following code.you will get the cursor in the same field if you use status message or information message.
selection-screen:begin of block b with frame title text-001.
parameters:a type i.
selection-screen:end of block b.
at selection-screen.
if a <> 3.
message s000(0) with 'hi this is chaitu'.
endif.
after showing the message the cursor is at a.
please rewards points if useful. -
Set Cursor to w.tax base (QSSHB) in FB60 through BTE event 1120
Is it possible to Set Cursor to w.tax base (QSSHB) in FB60 through BTE event 1120 .
I have to sum up the amt for GL Ac in BTE 1120 and dispay the msg.i have done upto this point.
Now i have to put the cursor to QSSHB with calcualted amt.so that user can go and change the amt.
Thanks in advance for any help. or is there any other way through user exit/badi.
Suresh.Yes custom folders needs to be created and mapping needs to be copied and changed.
How ever in your instance you are just changing the size of the datatype ,so I dont see the necessity of creating the same.
When you create custom folders there is an effort involved.
Like
1)Create custom folders in Informatica repository.
2)Copy the required mappings.
3)Develop/customize mappings.
4)Create logical folders in DAC.
5)Assign the mappings to these folders.
5)Setup the connection parameters.
6)Needs Subject area to be assebmled
7)EP to be built again.
8)Also generate parameter to your custom folder as well.
I would suggest only there is any customziation(any new table addition,SQL change,adding more columns,changing the inbuilt logic etc) go with custom folder approach.
Mark correct or helpful if it helps,
Regards,
Veeresh Rayan
Edited by: Veeresh Rayan on May 12, 2013 12:04 PM -
Locking a cursor to named plot
I am trying to lock a named cursor to a named plot. If I don't have a name for the cursor and leave the numerical index, the cursor will "lock to plot". If I use a property node to assign a cursor name, then all of the plots lock to the last cursor name.
I set up the properties in the cursor list before the name is applied to the cursor.hello,
I dont know if it is exactly what ou want to. I have done an example using property node to associate a cursor with a plot. Tell me if it is what you want to.
Hope this help.
Isabelle Jean
Isabelle
Ingénieur d'applications
National Instruments France
Attachments:
cursor.vi 37 KB -
Setting Cursor in ME53N !
Hi there,
I have a problem regarding ME53N. Purchase Requisitions.
I inserted a new message type E, and I want to set the cursor on a certain field, when that message pops in.
How can I do that?
Please help.
Thanks a lot.I will explain further my problem, because I was a little bit shortly in my issue exposure.
I implemented a BADI -- ME_PROCESS_REQ_CUST and the method PROCESS_ACCOUNT.
At one point in ME53N, with the fields Material Group & G/L Account NOT SET, the SAP System give 1st the "Enter G/L Account" error message and 2nd "Enter Material Group" error message.
The client request was to switch the messages, so 1st "Enter Material Group" and 2nd the "Enter G/L Account", because I had to automatically determine G/L Accounts based on Material Group.
Anyway, I solved this by coding at some point in PROCESS_ACCOUNT method the following:
CALL METHOD cl_message_handler_mm=>get_handler
IMPORTING
ex_handler = lref_msg.
CALL METHOD lref_msg->remove_all.
mmpur_message_force 'E' 'ME' '083' text-003 '' '' ''.
Now, the problem was solved, first the system gives "Enter Material Group" message first, but the cursor is not positioned on MATKL field.
I try to add before mmpur_message_force 'E' 'ME' '083' text-003 '' '' ''. this:
mmpur_metafield mmmfd_mat_grp BUT NOTHING HAPPENS
I cannot use SET CURSOR in implementation.
Please help,
Thanks a lot.
Edited by: bogysan on Jun 30, 2011 10:38 AM -
How can I set up a guest access point with a Time Capsule and an Airport Extreme? I am using a Telus router with the Time Capsule used as a wireless access point (bridge mode). I don't want the guest access point to have access to my network.
The Guest Network function of the Time Capsule and AirPort Extreme cannot be enabled when the device is in Bridge Mode. Unfortunately, with another router...the Telus...upstream on your network, Bridge Mode is indicated as the correct setting for all other routers on the network.
If you can replace the Telus gateway with a simple modem (that performs no routing functions), you should be able to configure either the Time Capsule or the AirPort Extreme....whichever is connected to the modem....to provide a Guest Network. -
Set cursor in Control String component
Hello:
I would like to set cursor in "Control String" automatically when I open my VI. If I open my VI, cursor should be seen automatically in the text field of "Control String". The user hasn`t set cursor by mouse into this field. Has anybody an idea how can I do?
Thanks!Create a property node for the control on your block diagram and set the Key Focus property value to TRUE.
http://zone.ni.com/reference/en-XX/help/371361H-01/lvprop/ctrl_key_focus/
Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.
"You are what you don't automate"
Inplaceness is synonymous with insidiousness
Maybe you are looking for
-
Trouble Opening Up Adobe Photoshop Lightroom 3 with current user permission
Hi, I recently purchased LR3 and downloaded it on my Mac, long story short, I have had issues and I called Adobe and they had to create a test/new user and it was able to open up through that user, but not my original user id. They told me that I wou
-
So I cannot figure this out. For some reason when I use the Remote app it doesn't work right. In iTunes it does not come up under the devices tab. I have tried both with and without my iPod connected and for some reason it just isn't working for me.
-
Web Sharing won't start anymore.
http://img187.imageshack.us/img187/5320/kuva7tg5.jpg "Web share is starting" and nothing happens. I wonder why, it worked a couple days ago.
-
Listening to itunes radio on iphone
Can you listen to itunes radio on iphone?
-
Using Windows 8.1 on Elitebook 2740p
I recently bought a refurbished Elitebook 2740p and it's great. I have installed Windows 8.1 because Windows 7 didn't seem to have anything going for it. But then I went to download drivers from HP website so that I can use MULTI-TOUCH!! Windows 8.1