See the top rated post in this thread. Click here

Results 1 to 3 of 3

Thread: Need help with looping through properly

  1. #1
    Member
    Join Date
    2012-08
    Posts
    6
    Login to Give a bone
    0

    Default Need help with looping through properly

    Hi,

    Let me preference by stating I'm not very good with lsp and this is my first attempt at trying to create a table with lsp. My issue is I'm no looping properly, but cant figure out the proper way to get it to work. If you look at the code you'll see I open 2 record sets. I open recordset 1 and then open recordset2 and loop through and then back to recrordset1. When I just look at the sql side of things it is looping through the records properly. But when writing the table portion I'm not able to get it to write the data in the same sequence. Meaning it is writing recordset 1 then recordset2 then recordset1 then recordset 2. What it should be doing is writing recordset1 then looping and writing recordset2 3 times then recordset 1 and then recordset2 3 times and so on. Here's some screen shots of the invalid sequence and then what I'm expecting.

    Any and all advice is appreciated.


    thanks
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    555
    Login to Give a bone
    1

    Default Re: Need help with looping through properly

    Try using a repeat rather than a foreach and nth of the list, you can limit then to 3 before going back to other list.

  3. #3
    Member
    Join Date
    2012-08
    Posts
    6
    Login to Give a bone
    0

    Default Re: Need help with looping through properly

    Thanks, I'll research that. I've never used the function prior so will need to determine if I can figure this out.

    Thanks

Similar Threads

  1. Getting Null after looping
    By avinash patil in forum Dot Net API
    Replies: 0
    Last Post: 2012-09-29, 04:53 AM
  2. Looping issue
    By kowen1208 in forum AutoLISP
    Replies: 7
    Last Post: 2011-06-20, 01:05 AM
  3. Looping Question
    By caddog71 in forum VBA/COM Interop
    Replies: 2
    Last Post: 2008-04-02, 10:13 PM
  4. looping and store user input??
    By d_m_hopper in forum AutoLISP
    Replies: 8
    Last Post: 2008-02-13, 02:49 PM
  5. Dizzy from Looping
    By madcadder in forum AutoLISP
    Replies: 11
    Last Post: 2005-06-30, 09:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •