Using custom control: draw a line and output start and end points

I'm looking to find or make a custom control (or simple Subvi), which appears as a grid of 100 x 100 unit and allow me to draw a line from one point to another on this grid. It will then display (x, y) of departure and the point of this line on the grid.  Any help or ideas?

Thank you

Steve

LabVIEW 2009 SP1

You want essentially is a loop with an event structure when you process mouse down, move and up to events for the controls. There are several ways to implement something like that, but it will be probably the simplest:

  1. Use a table or a listbox multicolumn for your grid. Hide scrollbars and headers.
  2. You can use the ActiveCell property to-2, - 2 to select all cells. You can then use the cell size property to define the exact size of the cell.
  3. Then you put a picture on the top of the table control and color its transparent background so that the table shows through. Property node allows you to ensure that both line up on exactly the same location and size.
  4. You use the mouse on the image control events to detect clicks and moves.
  5. Point of the table to the method of the column line allows you to translate the position data of the event to a cell.
  6. You use the image control screws to draw the line on the photo based on these data.
  7. You can even color the cells selected in the table by using the table properties.

If you want to simplify things a bit, you can also use the event of timeout instead of moving the mouse event to draw the line, but then you keep the timeout value in a shift register and hand it to-1 (no timeout) when the mouse event to the top.

I would also say treatment mouse enter and leave events to change the cursor and cancellation if the user leaves in the middle of drag.

Tags: NI Software

Similar Questions

  • Graduated filter: on the screen, I do not see 3 lines and a point. It applies the gradient between the middle and it affects the entire slide

    Graduated filter: on the screen, I do not see 3 lines and a point. It applies the gradient between the middle and it affects the whole slide.

    Please help me

    Press H

  • Type of Photoshop on the path starting and ending points are missing

    Type of Photoshop on way CS6 beginning and ending to dragging points are missing, can't move type autour on the path.

    as you can see here: http://www.screencast.com/t/mE9234Ri

    They do not show upward with all the shortcuts, I think, and it's not just on my computer, but the College computers too

    Thank youScreen Shot 2013-04-02 at 5.33.49 PM.png

    Hold down the Ctrl/command key while using the text tool (with the text layer active, so that you can see the blinking cursor).

  • My Windows Update does not work. When I try to access it, a box flashes on my screen, but I can't access it. I tried to use Windows Update via on line, and the same thing happens. Help!

    Too bad.  I managed to do the work.  I will now reboot and see if it solved the problem.

    OK, I restarted.  Always impossible to get Windows Update to happen on the screen.

  • Need help, use the control Timer my application does not start

    Hello guys

    I have problems, follow the example signals and Slots, but when my application is running, it does not start.

    If I delete all the code that deals with the Timer control, it's working again, my theory is that the CustomTimer library does not stunts

    Can you help me?

    Thank you very much

    My guess is many people have followed this during the first startup, I certainly did and it worked for me.

    It's probably something simple, missed, without seeing your code it's going to be difficult to diagnose.

    My first advice is always to check the log and see if messages are coming that may be related.

  • Need to draw the line & bargraph on Blackberry using JDE 4.7

    Hello

    I need to draw a line and a graphic barcode using JDE 4.7.

    can someone help me find the starting point.

    Thanks in advance.

    The forum search will often provide an answer.

    http://supportforums.BlackBerry.com/T5/Java-development/how-implements-a-chart-on-BlackBerry/m-p/465...

  • What is the right way to use variables controlled by the two buttons and programming?

    First of all, I apologize if this has been discussed before.  I know not how to phrase succinctly the application, so maybe I just missed the search terms.

    We have several pieces of the Labview software in the laboratory that automatically control things like the taps and heaters.  Sometimes we also manually control these same things.  I'm moving old NI PCI (and older versions of Labview) maps to a variable and based on compactRIO system shared network.  However, I'm still not on best practices to achieve.  I need to be able to have a script running at any time control panel so that I can access, for example, a valve controller (which is just a Boolean), and I need power open and close the valve by programming other scripts.  I need, of course, the control panel to track the State of the valve until it opens another script, the Panel indicates that it is open, and the next push on the control panel it will close.

    Historically, this has been processed using structures business to move from a "computer control" and "hands-on" with global variables that define the State of the valves.  Of course, this is not recommended.

    So far, I've played with the help of two variables, a status of valve and the other for the State of button.  The Panel configuration then loops, reads the status of the valve and puts the State of button if the State of the valve has changed.  I can do this with registers at offset or with the structures of the event, but anyway, it gets very crowded and seems inefficient.  Is there a good way to do this in Labview?  It seems this is a common problem, so I hope there is an easy and elegant solution that I've missed.

    Variable published use shared network.  Your scenario and your manual of the interface and change the variable and then shared your cRIO reads fair value and writes the appropriate values.

    Now for a cool part.  On your manual interface, right-click on your heart control that you want to use to control the shared variable and go to properties.  There should be a data binding tab in the Properties dialog box.  You can bind a control/indicator to a published network shared variable.  So this button will always be attributed to the current state.

    Your script should just read the shared variable before resuming to verify that it is in the correct state.

  • How to dynamically add any control (digital button, boolean) to control the line and selected column

    Hello

    How to add a control (digital button, boolean) dynamically in control instead of lines and columns selected. Please suggest the idea or no matter what example code you have please share with me...

    Thank you

    Vieu

    Essentially, that's what you're looking for:

    Please note that you have to account border sizes and the label of the control so that the code does not work right out of the box. You should also check for the height and width of column and if the position is valid at all before moving around the control.

    Norbert

  • "a custom control callback raised an exception."

    Hi all

    Yes, there are several posts about this error message, but they are all fairly old)<2009) and="" the="" solutions="" didn't="" seem="" to="" work,="" so="" i'm="" starting="" a="" new="">

    I installed 2013sp1 last week and removed 8.5, 2010 and 2012 this morning. And now one of my projects will not compile. Other projects are not affected (I tried about 10 in two different workspaces).

    When I compile, I get a pop-up box with "a reminder of custom control triggered an exception" and it comes back as soon as I click on it. I must kill CVI. It is a compiled project itself with CVI2012 (no warning). I can open and save files to the IUR with CVI2013, no problem. I also deleted the file cws, no change.

    I have generated a log of debugging (cleaned up a bit):

    [ERROR] [NationalInstruments_Restricted::LicenseCommon::getAddOnRegistryInfo] [..\licmgr\LicenseCommon.cpp:83] Error reading licensing information from registry key 'SOFTWARE\National Instruments\CVI\13.0\AddOns\Real-Time'
    [WARNING] [LWGetTreeItem] [..\james\ui_tree.c:1481] Err = -55
    [WARNING] [ChainPanelCallback] [..\james\toolbox.c:584] Err = -45
    [ERROR] [NationalInstruments_Restricted::LicenseCommon::getAddOnRegistryInfo] [..\licmgr\LicenseCommon.cpp:83] Error reading licensing information from registry key 'SOFTWARE\National Instruments\CVI\13.0\AddOns\Real-Time'
    [WARNING] [CheckForAutoRecover] [..\james\AutoSave.c:376] Err = -101
    [WARNING] [LWGetTreeItem] [..\james\ui_tree.c:1481] Err = -55
    [WARNING] [WorkspaceFileProc] [..\james\jn_work.c:657] Trying to load current workspace UFR.
    [ERROR] [NationalInstruments_Restricted::LicenseCommon::getAddOnRegistryInfo] [..\licmgr\LicenseCommon.cpp:83] Error reading licensing information from registry key 'SOFTWARE\National Instruments\CVI\13.0\AddOns\Real-Time'
    [BUILD] [RunJamfileBuild] [..\jon\srctxtcc.c:3331] Building s:\nedm\AcqEDM_Project\AcqEDMv4\cvibuild.AcqEDMv4\Debug
    [BUILD] [MonitorBuildProcess] [..\jon\srctxtcc.c:3644] ...found 248 target(s)...
    [FATAL] [AddFunctionToFakeFp] [..\jon\srcbrowse.c:12459] Assertion failed: typeName
    

    The last line gets duplicated whenever I click on the shortcut menu, also is it relevant.

    Hello gdargaud!

    We have determined that the accident is due to a bug in the HTML generation in CVI.

    The definition of VOC parameter analysed by the mechanism of generation HTML, causes instability in the CVI:

    public static int FitETH (double (* VOC) [4])

    To avoid this bug in CVI and still be able to use HTML generation with your project, you could do the following:

    1. Define your parameters using only a pointer.
    2. Typedef allows to separate the declaration of the type of the array pointer:
      typedef double * pDoubleT;
      public static int FitETH (pDoubleT array [4]) {...}

    We have reported this bug under ID #467835.

    I hope this helps!

    Best regards!

  • Strange problem brush which compensates for the model of the line and double it... Help?

    Hey everybody! Last night, I made a brush of Ribbon for a project at work. It worked as it should and I gave it to a colleague of mine so that it could use is as well. This morning, however, my colleague tells me she is having problems with the brush because it wasn't appearing when she used. I opened the file HAVE on my computer to check it out and everything seems fine, the lines that I did the other night not appear correctly. However, when I tried to draw another line and apply the brush, the ground was shifted to the line, AND it seemed to have doubled.

    Here's a sample of what I mean; the top is a line that I drew last night and the bottom is the same line, just copied and pasted below:

    ribbon_brush_issue.png

    I can move the lines, I did the other night, on the model around and it works correctly, but if I copy the line or by using the same brush to draw, I get double up to offset glitch.

    Thank you for taking the time to read this. All advice is appreciated!

    The brush is constructed with a clipping group. This does not work properly.

    You might drag the brush in the Panel forms. Then ungroup. Then take the part of the brush that isn't a corner and use the pathfinder Crop on it.

    Then create a new brush.

    Works for me.

    You can use this file? https://DL.dropboxusercontent.com/u/15485305/ribbon_brush_issue-mg.AI

  • Why photoshop create new shape layer whenever I draw a line?

    Hi guys

    I try to draw a bunch of lines, but Im having a problem. I start with a blank page, then I create a new layer. There are, I have the line tool and draw a line under this layer. That layer because that immediately a layer of "shape". Then I draw another line, and rather than stay on the layer, it makes a new layer of 'shape' and mask the previous layer. This continues and and for each line, it makes a new layer and previous mask. Why he continue to create new layers? I want that all the lines stay on the same layer.

    Thanks for your help

    Alex

    As c.p you said "almost."  Choose 'Combine shapes' in this dialog box, Options bar.

  • Boredom: "Use Custom base Grid" automatically sets

    "Use Custom base Grid" is automatically (and unwanted) enabled in the new pages added at the end of the thread.

    This happens if the new text is pasted into the end of the text, or on a page break. Investigation with CMD + B, all the foregoing pages recently added pages do not have the "Custom" box checked (they demonstrate preferences > settings of the grid), still make new ones.

    How one eliminates this phenomenon in InDesign CS5?

    I have the feeling that I forget something very simple, but sometimes I lose the forest among the trees. Thanks in advance.

    At some point, you have checked the box to use grids custom with no selected text block. To fix this in the existing documents, uncheck the box with no selected frames. and check that it is also deactivated without open files to prevent it from being the default value in the new files.

  • Confusion in the order of line and statement-level trigger

    Hi can anyone tell me, if I create a trigger on the emp table as in order...

    BEFORE INSERTING... LINE LEVEL
    BEFORE INSERTING... LEVEL STMNT
    AFTER INSERTING... LINE LEVEL
    AFTER INSERTING... LEVEL STMNT


    that will be the order of execution of the trigers?
    How oracle will decide order?

    Please give me some documents related to the order of execution of triggers... thnx in advance... !

    PC says:
    Hello.. Obtained response on the order of... but 1 weird point I m feeling that

    in the case of, before insertion... stmnt fire triger level 1 then insert before... line.

    but in the case of after insert... fireing level trigger line then 1 after insertion... stmnt level...

    can you explain this also...

    Why is it so strange.

    You have a statement that you are running.

    The first possible thing is that you are 'before' the statement.

    The next thing that is possible is that the statement is executed for each line.

    So for each line, there is a 'before' to each line and a point "after" each line.

    Once the statement is executed, you are 'after' the statement.

    Thus, it makes sense the statement triggers surrounds education and line triggers are education, and of course 'before' comes before 'after '.

  • can I choose the photo of the start and end positions to get rid of black borders?

    I tried to use the trial version of first elements 8 before buy you to see if it's able to do what I need to.

    I want to create a dvd photo, which is simple. I would like to use the scale feature to get rid of black borders and choose the start or end point of the photo.  the resolution of the photos are also terrible on screen, and when I import out in an uncompressed avi file. The photos are really high resolution and are very well in other programs.  Some of the photos sparkle even with anti flicker option enabled up to 100%.

    Adobe first elements may be able to make a dvd photo, or should I look at another adobe program?

    As Steve, pre can get you a DVD-video or a BD (for HD projects), but these will be on video and will be limited to the resolution of these two broadcast formats. If this is what you want, then the pre will do just fine.

    Regarding the images, I would NOT use all (or many) on the scale. Instead, I want to resize the images to match the size of the frame of the video project in Photoshop. This ARTICLE will give you some information and some advice.

    Good luck

    Hunt

  • Question buttons, redirect optional URL and "Set points".

    Hello Apex experts... and others!
    I tried to use the "redirect to URL Optional" and "Set POINTS" a button to initiate new elements of page target.
    It does not, the target_page elements are not being updated!
    Deletion of the redirect URL and create a branch when 'NEXT' and assigning the same target page elements works fine
    What is the difference?
    When should I use the "Optional URL forwarding" option?
    / Curious Guan

    When the creation of a button if you select "Create Button in a position of region" button becomes an of the Page "button, if you select 'Create a button displayed among the elements of this region', it becomes just a button or a region...

    V/R

    Robert

Maybe you are looking for

  • Redirect mail some contacts so that they find themselves in a different Inbox I have

    Hello! I represent a couple of different companies and I have 7 inboxes. The problem is that some of the executives of these companies contact me via my standard workmail instead of the certain Inbox set we have for them. So I want to be able to redi

  • Windows 7 bluescreen error BCCode 116

    I have a laptop Acer 5738, what CPU Intel core 2 Duo and 4 GB of DDR2 RAM.These days, I am facing problem of bluescreen with error codes as below: Signature of the problem:Problem event name: BlueScreenThe system version: 6.1.7600.2.0.0.256.1Locale I

  • 4 TB HARD drive in windows 7 with Aspire M1641?

    I installed Windows 7 on my Aspire M1641 and want to use a 4 TB HARD drive.How to handle that? I put it as a GPT disk, but it recognizes the disc as GB 1678.

  • AC adapter for Dell Studio XPS 1640

    Recently purched a new power adapter for charging and using my laptop but it won't work, when I plug it, said he does not recognize the type of card, don't know if it's the wrong adapter or what is supposed to be right, any ideas what to do PLEASE

  • No cuando escucho audio estoy en pausa y avanzo frame an image

    Hola! Hace unos Días actualice first a CC 2015 y utilizo Mac.   Antes siempre estaba in una sequence any as the reproduccion pausaba, podia chassis avanzar y con chassis las command of derecha e izquierda y escuchaba audio solo ese el framework e eve