Permutation between 2 lines in a control table

How do swap you 2 lines in a table without delay effect?

Currently, I copied all the data for a row to a temporary buffer, crush the line with the line to be traded. Then replace the line interchanged with the data in the temporary buffer, something like the bubble sort algorithm.

I've only used the "GetTableCellVal" and "SetTableCellVal" functions with multiple loops "for".

I'm able to exchange between the rows, but the Exchange takes some time.

No idea how to switch lines without delay a time important?

If all the cells in each row have the same type of cell (and the type of data, if they are digital) then you can use GetTableCellRangeVals / SetTableCellRangeVals instead, which should speed things up.

Another trick is to hide the table temporarily (attribute ATTR_VISIBLE) around the entire operation. This prevents the SetTableCellVal or SetTableCellRangeVals to start a new drawing of the table. Redesigns can be slow, and in this case you don't need any drawing until you have finished with the swap. When you make the table visible once again, it will redraw automatically the next time that the events are handled.

An alternative to creating and getting each value is to use the Clipboard table functions. I don't really know if it would be faster, but you can test it and find out. The code should look like this:

GetNumTableRows (Panel, PANEL_TABLE, & numRows);
InsertTableRows (Panel, PANEL_TABLE, numRows + 1, 1, VAL_USE_MASTER_CELL_TYPE);
ClipboardPutTableVals (Panel, PANEL_TABLE, VAL_TABLE_ROW_RANGE (row1));
ClipboardGetTableVals (Panel, PANEL_TABLE, VAL_TABLE_ROW_RANGE(numRows+1), NULL);
ClipboardPutTableVals (Panel, PANEL_TABLE, VAL_TABLE_ROW_RANGE (row2));
ClipboardGetTableVals (Panel, PANEL_TABLE, VAL_TABLE_ROW_RANGE (row1), NULL);
ClipboardPutTableVals (Panel, PANEL_TABLE, VAL_TABLE_ROW_RANGE(numRows+1));
ClipboardGetTableVals (Panel, PANEL_TABLE, VAL_TABLE_ROW_RANGE (row2), NULL);
DeleteTableRows (Panel, PANEL_TABLE, numRows, 1);

It was not clear from your description that you can assume that the two lines to be swapped are always adjacent. If they are, then the code above could be greatly simplified, since in this case, simply make a copy of leapfrog:

InsertTableRows (Panel, PANEL_TABLE, topRow + 2, 1, VAL_USE_MASTER_CELL_TYPE);
ClipboardPutTableVals (Panel, PANEL_TABLE, VAL_TABLE_ROW_RANGE (topRow));
ClipboardGetTableVals (Panel, PANEL_TABLE, VAL_TABLE_ROW_RANGE(topRow+2), NULL);
DeleteTableRows (Panel, PANEL_TABLE, topRow, 1);

Hope this helps,

Luis

Tags: NI Software

Similar Questions

  • remove the space between the lines of tables

    Hello

    How can I get rid of the excess space between the lines in the attached table?  It looks nice and tight in DW, but extends more place in IE and Firefox.  I tried to adjust the height of the cell but no effect.

    Thank you!  TTT

    Try to add this CSS to your style sheets 1.  It will not change the cell height, but he's going to build your lists a little.

    ul,li {line-height: 1; margin-top:0; margin-bottom:0}
    

    Nancy O.
    ALT-Web Design & Publishing
    Web | Graphics | Print | Media specialists
    www.Alt-Web.com/
    www.Twitter.com/ALTWEB
    -------------------------
    HTML Validator - http://validator.w3.org

    CSS Validator - http://jigsaw.w3.org/css-validator/

    Tutorials HTML & CSS - http://w3schools.com/

  • How to create a table with spaces between the lines...

    Hello

    I use jdev 11.1.1.6 and I need to insert spaces between the lines. How this can be done?

    Thank you and best regards,
    Tarun Agrawal

    Hello

    I'm sorry to forget on the spacer. You must use css like mentioned AP.

    Arun-

  • Using data from the control table

    Hello

    I would like to use the data entered in a table to automate volume/sequence of airflow for a test Chamber. As shown in the screenshot of control table, the first column indicates the number of iterations by elements of array in a series of tests and the second data column specifies the length of each line sequence. Entries in the other columns are specific to different valves and specify values set required in the flow meter.

    I guess my question is how can I index/assign each column of the table such that the data to exploit the respective valves are obtained in subsequent iterations all acquire simultaneously with data from other components in the order? While I recognize that the solution may be very simple, I searched on through various examples and messages on the tables and the tables without knocking on a solution. The attached .vi allows me to be a part of the series of tests.

    Best regards

    Callisto

    Hi Callisto,

    If I understand your question then the solution is actually quite simple. The important point to keep in min is the fact that the Table control can actually be treated as an array of string. You can then use all the traditional table manipulation tools and techniques to manipulate your data as you wish. For example, use the Array Index function to retrieve specific columns and then if you want to spend the individual elements in a column in a loop, wire the table until the loop and ensure that indexing is enabled. If you then want to use these data elements to control your test application, you can convert a portion of the resulting string in more useful to digital.

    All these concepts are illustrated in the attached VI. I hope this helps, but let me know if you have any other questions.

    Best regards

    Christian Hartshorne

    NIUK

  • initialize the control table dimension

    I use LV 2009 SP1 and you want to create a table 1 d of size control fixed.  The elements of the array are a defined group of different controls (enum and boolean) data type.  Control table will reside on a front panel and will be initialized with the values via the software, but the user will have access to change the values of array element (for example, change the enum and boolean controls.  While the user has access to edit the elements of the array, I don't want the user to be able to add new items in the table.  The table must have a vertical scroll bar, given that the number of elements at initialization of the array can be great and also can vary.  I am familiar with the property of the table "Number of lines", but it only controls the number of visible rows in the table.

    Is there a way to set the number of items per program and still have a scroll for the user to index bar using the table, but not add new items?

    Also see the attached screenshot for reference.

    Thank you

    Dan

    I found an acceptable solution through the reading of other forum posts.

    For others, who may find this useful:

    By hiding the display of array index and all the scroll bars, the table can be fixed to the size.  A separate scrollbar is used for the index in the table by writing to the array of Index values property.  The min/max scroll bar may be limited by writing to the Min Doc, Doc Max properties.  I've attached a screenshot of the block diagram.  The value of constant labeled '# lines visible-1' is on the number of items pulled on the panle front less 1 and remains in control of the table of displayiong of the empty elements that allow the user to change.  Also, even if the Page Size property has a value of zero for the scorllbar, which should allow scrolling of the Min Doc to Doc Max, he does not accept it as a valid value and is instead converted to a value of 1.  I introduced a SR on it's a bug because the LV help suggests that the values zero or negative must be acceptable to the Size property of the Page.

    I think it's the solution to the question, although it would be preferable that the size of the table control could be fixed size affecting a property element.  I'll see about adding this title of suggestion.

    Dan

  • Obtaining error APP-FND-00874: Routine FDFBDF found no line in the FND_DESCRIPTIVE_FLEXS table

    I wrote a stored procedure in our custom schema.  I have granted rights of running APPS to it.   When put in a concurrent program I get this message and it will not even start running. I'm under the it the purchase of Super user


    APP-FND-00874: Routine FDFBDF found no line in the FND_DESCRIPTIVE_FLEXS table


    So I created 2 exactly stored procedures as below but different name.  I put one in our custom schema and the other in the scheme of the APPS and I still get the same error message.


    create or replace

    PROCEDURE TESTPROCEDURE1 (errbuf OUT VARCHAR2, OUT VARCHAR2 retcode) HAVE

    BEGIN

    NULL;

    END TESTPROCEDURE1;

    Was that there was a control on behalf of the simultaneous request character and, possibly, the short name.   It was not visible until I stuck in another application.

    Thank you for all your help.

  • Insert a line between the lines

    Is it possible to add a line between the lines?

    Hello Vic,

    Yes it is.

    Place a button on your table and add the following to its click event Javascript code:

    var currentRepeatable = this.parent;
    var im = currentRepeatable.instanceManager;
    var newRepeatable = im.addInstance(1);
    im.moveInstance(newRepeatable.index, this.parent.index);
    

    You may have to replace "this.parent" in line 1 by another SOM-Expression refers to your repeatable line containing your button.

    Currently, the new instance is inserted before the line containing the button. If you want to insert, after the change of current line, the last line:

    im.moveInstance(newRepeatable.index, this.parent.index + 1);
    

    Hope that helps,

    Martin

  • Point of intersection between the line interpolated in Grapher

    How to find the point of intersection between interpolated lines using points offered as input to a file in grapher comps?

    What version of Mac OS X?

  • Low contrast between the lines of measurement and background

    There is little contrast between the lines of action (dark gray) and (dark gray) background in the arrange window. Did someone come with a 'fix' yet for this?

    I speak now of LPX.

    Thank you!

    Have you tried to check this box...

  • Save control table .cfg with knots of property.

    Hello!

    I have a façade with many (and I mean a lot!) boolean tables in tabs, and I want the ability to save the values selected by the user in a .cfg file, which will be used to make the same selection again without the trouble of clicking on buttons. The only controls that I want to save the value are Boolean tables 1 d of length 7 or 11, and these occur only on some pages tab. others have been setup so that their iteration a false criterion is satisfied and no code is running.

    I managed to get references to each control within each tab, and using a "more specific class' function to reduce it to only the controls in table. However, when this runs, pops up an error of "convert variant data" and use of a probe shows me the reference being called by my property at the time of the error node is to an INDICATOR array, rather than control. I thought that the node of 'controls on the page' and subsequently the control table class specifier would mean that references to other types of table would not make the real case where coming the backup configuration file.

    The indicator in question is a painting of a cluster of two strings and an array of strings, if that makes any sense / has no relevance, and the error occurs on the iteration 1 of the outer loop and the loop iteration 21 internal, corresponding to the control reference 22nd in the second tab.

    I hope that I have the problem clearly.

    There is a property called control? (or indicator?) This will help you sort out them.  I don't remember the exact name of the property, but that should get you close enough to find.

    Lynn

  • How can I close a space between the lines?

    I typed a promissory note and have extra space between the lines.  How can I close this space?

    Hello

    Click on the "Line spacing" icon in the section 'Paragraph' of the 'Home' tab This icon is the fourth first in the default icon and has a high and arrow down to it.

    Click your setting spacing appropriate line in the list that appears.

    Change the default font size

    http://www.askdavetaylor.com/change_default_font_size_in_wordpad.html

    Windows XP Professional must have a copy of the Works word processor.  It is easier to work with.

    Start > type Works

    Select the word processor from the list

    If it does not, go to C:\\Program Microsoft Works

    Search for MSWorks

    Double-click the file to launch

    The icon looks like this in Windows Vista-

  • angles between the lines

    I am trying to find a way to understand the angle between the lines. These lines will always intersect. For example, if a line has xy of 100.0 and 100 200 values and the other line has a value of 0.50 xy and 200.50. These two lines when Wescott on a graph are 90 degrees to each other. I can just find a way to do this. Any ideas?

    Here's a way to do it. You can also use the mathematical functions to make it as Lynn suggested.

    Ben

  • What is fledge command-line argument to control the graphics acceleration?

    Is there a command line argument to control the graphics acceleration for a JDE 5.0 Simulator?

    I would like to switch off in the command line so I can add it to the Simulator Run Eclipse IDE and the debug configuration.

    I checked their moult imaginal/Help and I have not found any that I could see that it works.

    Thank you.

    The settings are stored in a file located at

    \Documents and Settings\ [windows login name]\net\rim\fledge-2\fledge-saved.conf

    At the bottom of the appearance of file for the line:

    4
    

    Change the number 0 for no acceleration.

  • change the spaceing between the lines in files

    How can I change the spaceing between the lines in files

    Hello

    What do you mean exactly by change spacing between lines in files?
    Follow the given link that helps you accomplish the task.
    Change your screen resolution: http://windows.microsoft.com/en-US/windows7/Change-your-screen-resolution
    You can also view: folders: frequently asked questions: http://windows.microsoft.com/en-US/windows7/Folders-frequently-asked-questions
     
  • Remove the space between the lines of code

    Somehow, a space appeared between every line of code on a file, that I'm working on. How to remove these spaces using find and replace in Dreamweaver CC?

    Try

Maybe you are looking for

  • Why is there no way to define a homescreen? This is so basic! How could it be a problem?

    This feature was available in earlier versions. Now, why not? How could this be a problem? I would like to take back.

  • setting DPI of the image

    I am trying to create an image and then that save in a file to print later. I noticed that the photo features seem to default to an image of 96 dpi. Is it possible to increase it? I need to add a nice little text to the image and it turns to be eligi

  • T6 IR remote?

    Received a T6 digital SLR kit for a trip. Camera and objectives are functioning as they should, but it came with an infrared remote shutter release. I can't find a setting on the camera to enable it. The T6 has an infrared sensor and if so, how do I

  • How and where can I download and run, lack tasklist.exe?

    Try to find what causes my CPU to have high CPU utilization. Someone said, I could check the CPU high usage by going to RUN and type cmd, enter, and then type tasklist/SVC. but I get an error saying, essentially, that there is no task list. So, how c

  • My computer blocked at crcdisk.sys and do not start correctly.

    Original title: my computer does not start correctly my computer does not start up correctly it keeps stuck on the pilot after \crcdisk.sys on windows 32 - bit home premim I have the productkey