Nested for loops error

Hi all Community members,, I am facing problem with pulling attributes from a xml which I have created. I am using nested for loop. Please kindly help me out to solve this problem....
Thanks in advance...
Below is the code & xml ...
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.events.*;
import flash.net.*;
var myXML:XML;
var voiceOver:String;
var startOffset:Number;
var slideData:Array;
var id_cont_array:Array = new Array();
var id_textfield_array:Array = new Array();
var id_image_array:Array = new Array();
var myXML_Container_Length:Number;
var myXML_textField_Length:Number;
var myXML_images_Length:Number;
var loader:URLLoader = new URLLoader();
loader.load(new URLRequest("dynamic.xml"));
loader.addEventListener(Event.COMPLETE,processXML);
function processXML(e:Event):void
slideData=new Array();
myXML = new XML(loader.data);
loader.removeEventListener(Event.COMPLETE, processXML);
loader.removeEventListener(IOErrorEvent.IO_ERROR, loadError);
myXML = new XML(e.target.data);
voiceOver = myXML. @ voice_over;
startOffset = myXML. @ start_offset;
for (var i : uint = 0; i<myXML.*.length(); i++)
  //trace(myXML + "slide");
//myXML_List = myXML.children();
myXML_Container_Length = myXML.children().length();
//trace(myXML_Container_Length+ "==myXML_Container_Length")
//myXML_textField_Length = myXML.containerss[0].children().length();
//myXML_images_Length = myXML.children().length();
//trace(myXML.child("containerss")[3]. @ id.toXMLString()+ "==myXML.containerss[0]. @ id;");
//trace(myXML.containerss[0].textfield[0]. @ id+ "==myXML.slide.containerss[0]. @ id");
//trace(myXML.containerss[0].textfield[1]. @ id+ "==myXML.slide.containerss[1]. @ id");
//trace(myXML.containerss[3].image[0]. @ id + "==image[0]");
//trace(myXML.containerss[0].children() + "==myXML.containerss[0].children()");
for (var j:Number=0; j<=myXML_Container_Length; j++)
  id_cont_array.push(myXML.containerss[j]. @ id);
  //trace(myXML.containerss[j].children().length() + "==j");
  myXML_textField_Length = myXML.containerss[j].children().length();
  trace(myXML_textField_Length + "==myXML_textField_Length");
  for (var k:Number=0; k<=myXML_textField_Length-1; k++)
   id_textfield_array.push(myXML.containerss[j].textfield[k]. @ id);
   //id_image_array.push(myXML.containerss[k].image[j]. @ id);
   trace(id_textfield_array[k] + "==id_textfield_array[k]==" + k + "---j==" + j);
   //trace(id_image_array[k] + "==id_image_array");
  //trace(id_textfield_array[j]+"==id_cont_array[j]");
//trace(myXML_List.length() + "===myXML_List");
function loadError(e:IOErrorEvent):void
trace("loadError");
/// XML is as given below..
<slide orientation="VERTICAL" voice_over="Slide1.mp3" start_offset="0" margin="">
<containerss id="0" orientation="HORIZONTAL" padding="10" margin="10" x="10" y="160" width="200" height="150">
  <textfield id="Text1" text="textfieldText1" padding="10" margin="10"  x="10" y="160"/>
  <image id="img1" text="" padding="10" margin="10" x="10" y="160"/>
  <textfield id="Text2" text="textfieldText2" padding="10" margin="10" x="10" y="160"/>
</containerss>
<containerss id="1" orientation="HORIZONTAL" padding="10" margin="10" width="200" height="200" x="10" y="160">
  <textfield id="Text3" text="textfieldText3" padding="10" margin="10" x="10" y="160"/>
  <image id="img2" text="" padding="10" margin="10" x="10" y="160"/>
</containerss>
<containerss id="2" orientation="VERTICAL" padding="10" margin="10" width="200" height="150" x="10" y="160">
  <textfield id="Text5" text="textfieldText5" padding="10" margin="10" width="200" height="150" x="10" y="160"/>
  <image id="img3" text="" padding="10" margin="10" x="10" y="160"/>
  <textfield id="Text6" text="textfieldText6" padding="10" margin="10" x="10" y="160"/>
</containerss>
<containerss id="4" orientation="VERTICAL" padding="10" margin="10" width="200" height="150" x="10" y="160">
  <textfield id="Text7" text="textfieldText7" padding="10" margin="10" width="200" height="150" x="10" y="160"/>
  <image id="img4" text="" padding="10" margin="10" x="10" y="160"/>
  <textfield id="Text8" text="textfieldText8" padding="10" margin="10" width="200" height="150" x="10" y="160"/>
</containerss>
</slide>

Parsing is totally wrong. You function processXML() should be like that:
function processXML(e:Event):void
          slideData = new Array();
          loader.removeEventListener(Event.COMPLETE, processXML);
          loader.removeEventListener(IOErrorEvent.IO_ERROR, loadError);
          myXML = new XML(e.target.data);
          voiceOver = myXML.@voice_over;
          startOffset = myXML.@start_offset;
          myXML_Container_Length = myXML.children().length();
          var node:XMLList;
          for (var j:Number = 0; j <= myXML_Container_Length - 1; j++)
                    id_cont_array.push(myXML.containerss[j].@id);
                    node = myXML.containerss[j].children();
                    myXML_textField_Length = node.length();
                    for (var k:Number = 0; k <= myXML_textField_Length - 1; k++)
                              switch (node[k].name().toString())
                                        case "textfield":
                                                  trace(node[k].@id);
                                                  id_textfield_array.push(node[k].@id);
                                                  break;
                                        case "image":
                                                  id_image_array.push(node.@id);
                                                  break;

Similar Messages

  • Issues with nested for loops - saving images from a camera

    Hi all,
    I've written a vi. to capture a specific number of images ('Image No') and save these images, outputted to a folder of my choice.  Each image is identified sequentially.  However, I wish to do a number of iterations ('Run') of this capture sequence, such that the filename of each image would be 'Filename (Run)_(Image No).png', e.g. run 5, image 10 would be 'Filename 5_10.png'.  I have tried a nested for loop for this but I receive an error 'Asynchronous I/O operation in progress' (I've attached a printscreen).
    Can anyone assist me in solving this problem? I preiously posted this in machine Vision but got no response (http://forums.ni.com/t5/Machine-Vision/Capturing-image-sequences-issues-with-nested-for-loops/m-p/19...).  Please find attached my vi.
    Kindest regards and thanks,
    Miika
    Solved!
    Go to Solution.
    Attachments:
    Labview problem.jpg ‏3841 KB
    Image sequence save to file.vi ‏48 KB

    Miika,
    the problem is not the filenam, but the name of the folder (AHHHHH!). You try to create the same folder in the outer for loop over and over again.... (it is the error message above the '======', not below )
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Capturing image sequences - issues with nested for loops

    Hi all,
    I've written a vi. to capture a specific number of images ('Image No') and save these images, outputted to a folder of my choice.  Each image is identified sequentially.  However, I wish to do a number of iterations ('Run') of this capture sequence, such that the filename of each image would be 'Filename (Run)_(Image No).png', e.g. run 5, image 10 would be 'Filename 5_10.png'.  I have tried a nested for loop for this but I receive an error 'Asynchronous I/O operation in progress' (I've attached a printscreen).
    Can anyone assist me in solving this problem?  Please find attached my vi.
    Kindest regards and thanks,
    Miika
    Solved!
    Go to Solution.
    Attachments:
    Image sequence save to file.vi ‏48 KB
    Labview problem.jpg ‏3841 KB

    Hi,
    You cannot create a folder if this one is already existing.
    Just check that the folder exists before creating it.
    Regards

  • Nested for loop in Xquery

    hi all,
    I need to implement nested for loop in Xquery, but not able to do. Please help.
    Thanks in advance..
    Rajan

    Nested for loops are simple in Xquery. Here is a very basic example:
    Input:
    <root>
    <FirstLevel>
         <SecondLevel>
              <Value>1</Value>
         </SecondLevel>
         <SecondLevel>
              <Value>2</Value>
         </SecondLevel>
         <SecondLevel>
              <Value>3</Value>
         </SecondLevel>
    </FirstLevel>
    <FirstLevel>
         <SecondLevel>
              <Value>4</Value>
         </SecondLevel>
         <SecondLevel>
              <Value>5</Value>
         </SecondLevel>
         <SecondLevel>
              <Value>6</Value>
         </SecondLevel>
    </FirstLevel>
    </root>XQuery:
    declare namespace ns0 = "http://temp.uri/OTM";
    declare function ns0:NestedForLoop($input as element(*))    as element(*)
         <ns0:Output>
              for $firstLevel in $input/FirstLevel
              for $secondLevel in $firstLevel/SecondLevel
                    return
                  <element>{ $secondLevel/Value/text() }</element>
         </ns0:Output>
    declare variable $input aselement(*) external;
    ns0:NestedForLoop($input)Output:
    <otm:Output       xmlns:otm="http://temp.uri/OTM">
         <element>1</element>
         <element>2</element>
         <element>3</element>
         <element>4</element>
         <element>5</element>
         <element>6</element>
    </otm:Output>Of course, this case is very simple and usually you wont even loop for this you can use a simple XPath like $input/FirstLevel/SecondLevel/Value/text() to achieve the above result. So, If you are having problems in a specific case of nested for loops, please post the input and output here and we can help out.

  • Nested For Loop Trouble?

    Ok I need to have a nested for loop that asks a user to enter in a int number from 1-50. Whatever the number is, lets say 4 I need the program to count up asterisk and count down asterisks, like this.
    This is my code:
    import java.io.*;
    public class Stars {
         static int n;
         static private InputStreamReader in = new InputStreamReader(System.in);
         static private BufferedReader br = new BufferedReader(in);
         public static void main(String[] Args)throws IOException
              System.out.println("Please enter in a number to see display: ");
              String num = br.readLine();
              n=Integer.parseInt(num);
              for(int i=1;i<=n;i++)
                   for(int j=1;j<=i;j++)
                        System.out.print("*");
                   for(int j=1;j<=i;j--)
                        System.out.print("*");
                   System.out.println();
    Can someone tell me what I am doing wrong so I can figure out my mistake(s).

    Ok, well I know that the loop relies on the number entered in by the user. So if i pick 3 the three enter in the loop and counts up in a for loop and for every number it counts up to the three it does a print("*"); Now what I am getting confused about is where the other for loop comes into play. I know that I need to start from the number I have which is 3, so I need to have one less than that and then count down. The thing is that i'm not sure where or how the second for loop gets implemented into the code. Does it get nested with the first loop like this:
    for(int i=1;i<=n;i++)
                   for(int j=1;j<=i;j++)
                            for(int j=n-1;j>=i;j--)
                        System.out.print("*");
                   System.out.println();
              }Or is the second for loop on its own like this:
    for(int i=1;i<=n;i++)
                   for(int j=1;j<=i;j++)
                        System.out.print("*");
                   for(int j=n-1;j>=i;j--)
                        System.out.print("*");
                   System.out.println();
              }If someone can help me understand, for this is my first time with nested for loops.

  • Interrupting Nested For Loops/Sequences

    I have a lagre program consisting of nested for loops and case statements calibrating an array of patch antennas. The entire process of which will take about 15 hours. During this time, I want to have two things happen.
    Every 20 minuites or so, I want the process to stop what it's doing, follow certain commands for the measurement equipment to recalibrate itself, and then go back to what it was doing.
    I also want to protect it against unpredicted and predicted crashes. If the system needs to stop for whatever reason, I would like to be able to pick up the process where it left off. A sort of checkpoint system, where, when it passes a checkpoint, if it needs to be restarted, I can tell it to start from the last checkpoint it passed.
    Anyone had any experiece with these types of problems?

    jaysmall wrote:
    I also want to protect it against unpredicted and predicted crashes. If the system needs to stop for whatever reason, I would like to be able to pick up the process where it left off. A sort of checkpoint system, where, when it passes a checkpoint, if it needs to be restarted, I can tell it to start from the last checkpoint it passed.
    Could you open and append parameters to a file? Every time you restart execution of the vi after crashes you can look through the contents of the file to determine the last operation that was successful and continue with the last know good settings.  -SS

  • Multiplication Table with Two Nested For Loops

    I am trying to code a multiplication table in which the user enters the number of rows between 2 and 10 and enters the number of columns from 2 to 10. This must be in nested for loop format somewhat like this:
    rows has been assigned the input variable for rows and columns is the name for input value for columns
    for (int i = 1; i <=rows; i++)
    for (int j = 1; j <=columns; j++)
    i * j
    i can't figure out how to get it to print out in table format or if the calculation coding is correct. can anyone help me please?
    it should look like this for rows is 4 and columns is 7
    1 2 3 4 5 6 7
    2 4 6 8 10 12 14
    3 6 9 12 15 18 21
    4 8 12 16 20 24 28
    Edited by: hatecodingsomuch on Feb 22, 2009 8:15 PM

    hatecodingsomuch wrote:
    I refuse to ask for help from people who are acting like they are all-knowing and unwilling to help someone, considering I am asking for help...to learn. Obviously I am not understanding java very well and I don't need to be ridiculed like this from members who are supposed to help "NEW TO JAVA" individuals. Get off your high horse or get off the website. I will never use this again.Good luck with that.
    You do seem to be yet another "do my homework for me" type of flunkie. I predict you'll soon have an epiphany that software development really isn't for you.
    I hope you know how to say "Do you want fries with that, sir?" better than the next guy so you can edge him out.

  • Nested for loops

    Sorry to bother you all, but I have a small problem with my java homework.
    I have to make a nested for loop to produce the following output:
    00
    10 11
    20 21 22
    30 31 32 33
    (only goes from 0 to 3)
    Now, all I have managed to do are two simple loops, one with increment 10 and the other with increment just ++.
    Could you help me?

    Think through this logically. You need two loops. You need this output:
    00
    10 11
    20 21 22
    30 31 32 33
    Each number above has two digits (two digits, two loops...not a coincidence). So you need one loop to control the first digit, and another loop to control the second digit. Look at the values for the first digit: 0,1,2,3. Those are your first loop values. Now, each time the first loop has a value, your second loop goes through all of its values. Here's the values you need:
    First iteration:
    loop index 1: 0
    loop index 2: 0
    Second iteration:
    loop index 1: 1
    loop index 2: 0,1
    Third Iteration:
    loop index 1: 2
    loop index 2: 0,1,2
    Fourth Iteration:
    loop index 1: 3
    loop index 2: 0,1,2,3
    Notice the pattern for loop 2? Look at the starting value for each iteration, and notice the ending value. That gives you your loop constraints.

  • Unable to put a timed structure in a parallel for loop, error -808

    If I try to place a Timed Structure in a Parallel For Loop, the TS needs a different structure name per instance to prevent collisions. However, setting the Structure Name node  to something unique per instance doesn't work, I get error -808. Have I missed something?
    Thoric (CLA, CLED, CTD and LabVIEW Champion)

    That got me thinking - something to do with the number of compiled parallel instances.
    Indeed, the compiler creates a number of parallel instances of the for loop in the compiled code (in my case 8), and uses the number requested at the Parallel Instances terminal (just under the Iterations terminal), which is set to 2. Therefore the compiler has created 8 instances of the Timed Structure, each in its own for loop instance, but they all have the same defined Structure Name. When launched, there is an immediate conflict because they can't share the same name, and error -808 is launched before the set Structure Name function can change it. Hence the error still shows when requesting only one instance, because the other seven still exist.
    I guess this means you can't have Timed Structures (or Timed Loops for that matter too) in a Parallelised For Loop?
    Thoric (CLA, CLED, CTD and LabVIEW Champion)

  • Problem cycling through elements of an array using a for loop ~ error 200609?

    Hi,
    I'm outputting a 194-element array from a MATLAB script node into a for loop where the array is indexed then converted into a 8-bit boolean pattern which I'm trying to output using DAQ Assistant. I'm using LabVIEW 8.2 and a PCI 6133 DAQ using a counter(Ctr0InternalOutput) to time the output. The first element of the array goes through the loop perfectly however never makes it's way back through and throws error 200609: Generation cannot be started because the slescted buffer size is too small. Increase the buffer size. After probing the line before DAQ Assistant I confirmed only one element makes it through the loop and then throws this error? I've trying doing the same things with lower lowel DAQmx vi's using a DAQmx configure output buffer vi to override this buffer size problem, but still get the same result(not the error but same data flow problem)? Anybody know what's going on? I've included the vi's I've been working with. Thanks!
    Millie
    Attachments:
    Untitled 22.vi ‏228 KB
    Untitled 34.vi ‏180 KB

    Hi,
    I'm outputting a 194-element array from a MATLAB script node into a for loop where the array is indexed then converted into a 8-bit boolean pattern which I'm trying to output using DAQ Assistant. I'm using LabVIEW 8.2 and a PCI 6133 DAQ using a counter(Ctr0InternalOutput) to time the output. The first element of the array goes through the loop perfectly however never makes it's way back through and throws error 200609: Generation cannot be started because the slescted buffer size is too small. Increase the buffer size. After probing the line before DAQ Assistant I confirmed only one element makes it through the loop and then throws this error? I've trying doing the same things with lower lowel DAQmx vi's using a DAQmx configure output buffer vi to override this buffer size problem, but still get the same result(not the error but same data flow problem)? Anybody know what's going on? I've included the vi's I've been working with. Thanks!
    Millie
    Attachments:
    Untitled 22.vi ‏228 KB
    Untitled 34.vi ‏180 KB

  • Nested for loop

    hello
    how can i implement this code in labview. i am new to labview, so plz if u design a vi of this code.
    for i=1:m
    c = (i-m/2);
    for j=1:n
    d = (j-n/2);
    N1(i,j)=exp(-(c^2+d^2)/c1^2);
    end
    end
    wher m is num of rows and n is number of column and c1 is a constant
    thnx
    kitty

    Here's a quick framework for you to start with.  I left out most of the math.
    Some things to notice:
    The i terminal starts with 0 and counts up for each iteration.  Since you want your math to start with 1, you need to increment.
    See the autoindexing out of the FOR loops?  That's what is building up your 2D array.
    Since you claim to be new, you might want to check out some of the online tutorials.
    LabVIEW Basics
    LabVIEW 101
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    Nested loop.png ‏13 KB

  • Trouble with charAt and nested for loops

    Hi,
    I have a programming assignment in which my goal is to write a program that reads a social security number written as contiguous digits (eg, 509435456; obtained via JOptionPane); uses charAt to obtain each character; and then prints each digit on a separate line, followed by a colon and the digit printed the number of times equal to its value. Thus the output for 509435456 would be:
    5:55555
    0:
    9:999999999
    4:4444
    3:333
    5:55555
    4:4444
    5:55555
    6:666666
    I'm also required to use a char variable for the inner loop control variable, and write the inner for loop as something along the lines of
    for(char index = '1'; index <= digit; index++) where digit is the char variable use to store the digit taken from the string.
    Here's what I have so far:
    import javax.swing.JOptionPane;
    public class Prog3a
         public static void main (String [] asd)
         String ssn = JOptionPane.showInputDialog("Que es tu SSN?");
         for (int rows = 0; rows < 9; rows++) //number of rows
                   char digit = ssn.charAt(rows) - '0';
                   System.out.print(digit + ":");
                   for (char index = 0; index < digit; index ++) //how many characters are going to be on each row
                             System.out.print(digit);
              System.out.println("");
    }Unfortunately, the char digit = ssn.charAt(rows) - '0'; errors on me, and only works when char is replaced with int. However, digit is no longer a char for the inner loop, and this fails to meet the requirements of the assignment. How can I assign the char without this "loss of precision"?

    Original Assignment:
    +3a. Write a program that reads a social security number written as contiguous digits (for instance, 509435456), uses the charAt method to obtain each character and then prints each digit on a separate line followed by a colon and the digit printed the number of times equal to its value. Thus the output for 509435456 would be+
    +5:55555+
    +0:+
    +9:999999999+
    +4:4444+
    +3:333+
    +5:55555+
    +4:4444+
    +5:55555+
    +6:666666+
    The string should be read using JOptopnPane.
    +Use a char variable, e.g., index, for the inner loop control variable and write the inner for loop as for(char index = '1'; index <= digit; index++) where digit is the char variable use to store the digit taken from the string.+
    +3b. Write the program so that index, the inner loop index, is an int variable. This means you must convert the character assigned to digit to an int.+
    Is that any help? It's as much as I know.

  • Nested for loop in the collections

    Hi Experts,
    collection1
    ============
    SELECT o.object_id
          BULK COLLECT INTO l_obj_info
            FROM (SELECT     n.node_id, n.object_id
                        FROM nodes n
                  START WITH n.node_id = 100
                  CONNECT BY PRIOR n.node_id = n.parent_node_id) n
                 INNER JOIN
                 objects o ON n.object_id = o.object_id
           WHERE o.object_type_id = 285;
    collection2
    ============
    SELECT *
          BULK COLLECT INTO l_tab
            FROM ((SELECT     REGEXP_SUBSTR (i_l_text, '[^,]+', 1, LEVEL)
                         FROM DUAL
                   CONNECT BY REGEXP_SUBSTR (i_l_text, '[^,]+', 1, LEVEL) IS NOT NULL));
       END;
    collection3
    ============
    SELECT o.object_id
                   BULK COLLECT INTO l_fin_tab
                     FROM objects o JOIN ATTRIBUTES att
                          ON o.object_id = att.object_id
                    WHERE o.object_id = collection1.object_id
                      --AND att.VALUE = collection2.val;
    Please tell me how to implement for loop in the collection3 to get the values from collection1 and collection2.
    i have tried in the below way
    CREATE OR REPLACE TYPE LIST_OF_ATTRIBUTES_TYPE AS TABLE OF varchar2(4000);
    CREATE OR REPLACE TYPE LIST_OF_OBJECT_IDS_TYPE AS TABLE OF number(9);
    CREATE OR REPLACE FUNCTION f_get_objects_by_type_id (
       i_object_type_id   IN   NUMBER,
       i_l_text           IN   VARCHAR2,
       i_scope_node_id         NUMBER
       RETURN list_of_object_ids_type
    AS
       CURSOR objs_info
       IS
          SELECT o.object_id
            FROM (SELECT     n.node_id, n.object_id
                        FROM nodes n
                  START WITH n.node_id = i_scope_node_id
                  CONNECT BY PRIOR n.node_id = n.parent_node_id) n
                 INNER JOIN
                 objects o ON n.object_id = o.object_id
           WHERE o.object_type_id = i_object_type_id;
       l_tab       list_of_attributes_type := list_of_attributes_type ();
       --l_obj_info   list_of_object_ids_type := list_of_object_ids_type ();
       l_fin_tab   list_of_object_ids_type := list_of_object_ids_type ();
    BEGIN
       BEGIN
          SELECT *
          BULK COLLECT INTO l_tab
            FROM ((SELECT     trREGEXP_SUBSTR (i_l_text, '[^,]+', 1, LEVEL)
                         FROM DUAL
                   CONNECT BY REGEXP_SUBSTR (i_l_text, '[^,]+', 1, LEVEL) IS NOT NULL));
       END;
       IF l_tab.COUNT > 0
       THEN
          FOR i IN objs_info
          LOOP
             FOR j IN l_tab.FIRST .. l_tab.LAST
             LOOP
                SELECT o.object_id
                BULK COLLECT INTO l_fin_tab
                  FROM objects o JOIN ATTRIBUTES att ON o.object_id =
                                                                     att.object_id
                 WHERE
                                att.VALUE = l_tab (j) and o.object_id =objs_info(i);
             END LOOP;
          END LOOP;
       END IF;
       RETURN l_fin_tab;
    END f_get_objects_by_type_id;

    Why are you wanting to do this?
    It looks like you are trying to implement SQL joins in PL code.  Not only is that using up expensive PGA memory by storing the data in collections, but doing such retrieval of data to try and join it in PL loops, is never going to be as fast as just joining the SQL queries using SQL itself.
    Post some example data and your database version, with an example of what the output should look like from that example data.
    Re: 2. How do I ask a question on the forums?

  • Set file position within a for loop, error 1

    Hi, I'm reading from a .sxm file consisting of a large chunk of text followed by binary data for 512x512 images with 4 bytes per pixel
    I’ve managed to successfully identify the start of the binary and read the first image from the file and view it using  "flatten pixmap.vi", so I’m doing something right, however when i try to read the next chunk of image data in the .sxm file using a for loop, set file position keeps churning out ERR (1).
    im at a loss as to whats causing this
    Solved!
    Go to Solution.
    Attachments:
    binaryread3d trouble.vi ‏22 KB
    back panel screenshot.png ‏27 KB

     I closed the file in the loop, doh! ... another morning well spent

  • I need to take elements from within 2 nested for loops and place them in an array at the specific row and column that I need.

    I have tried intializing an array and replacing elements by specifying a particular row, and column, but in the end I get an array with only one element replaced, and I suspect that it is because as the for loops are running through their iterations each time the array is re-initializing. I have a simple vi that I will post below, it is not the exact situation that I have but is a good place for me to get some understanding. I have the row and column indexes being driven by the inner and outer loop iterations, which gives me the pattern I need. I am using the inner iterations as array elements. How do I set this up so that it works and d
    oes keep re-initializing my array.
    Attachments:
    Untitled.vi ‏26 KB

    I have fixed a number of things in your vi.
    You were right in thinking that the array was continuously re-initialized. To avoid this, use a shift register (right-click the loop border), which will pass the updated array into the next iteration.
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    your_vi.vi.zip ‏13 KB

Maybe you are looking for

  • Step by step procedure for creating BOL

    Hi All, I am new to CRM and facing  a lot of problems while creating BOL. Please help me by providing some link which will guide step by step for creating BOL. Thanks Alsalfi

  • HTTPS XMLHttpRequests at localhost return no data

    I made myself an userscript that gathers certain data from websites I browse and stores them in cache on localhost. First I used to make standart cross-site HTTP XMLHttpRequests, however the firefox has implemented another XHR restriction that preven

  • What's the best approach to migrate to Snow Leopard using the time machine?

    I have a time capsule, and have noticed the restore from backup option once I had to replace the HD on my MacBook Pro. I am about to buy a new MacBook Pro which will probably ship with Snow Leopard, and am wandering, if when I setup the new OS I can

  • Alv grid: editable individaul fields or editable rows

    Hi All, i want to have the individual fields in an ALV or a complete row editable... Currently i am using the REUSE_ALV_GRID_DISPLAY where in the fieldcatalog if i use the edit=X then the whole column is editable... But instead i want the particular

  • How to write select option 'onchange' to sort by?

    From a previous thread, David Powers helped me write an array to use to sort from a list/menu of columns from a recordset $permitted = array('price', 'area'); // check whether the sort_menu variable contains a valid column name if (isset($_GET['sort_