Results 1 to 2 of 2

Thread: [RESOLVED] Extracting TXT from file to an Array, Then Reading the Array.

  1. #1

    Thread Starter
    Lively Member stevebriz's Avatar
    Join Date
    Jul 2006
    Location
    Santiago,Chile
    Posts
    95

    Resolved [RESOLVED] Extracting TXT from file to an Array, Then Reading the Array.

    I wish to bring data from text file into array so I can draw shapes on a form from using the co-ordinates and shape specified each line of the files. TEXT format is:
    ; lines
    L 3.0 3.0 0 -9.1,notes
    ; lines
    L 1.9 1.3 6.7 -4.6, notes2
    ; circle
    C 1.9 1.3 6.7, comment.

    Can anyone please tell me how to get this into to an array and then subquently read the array so Then I am able to set the shape properties (position,etc).for each shape relative to each line/circle etc?
    Thanks!

  2. #2
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Extracting TXT from file to an Array, Then Reading the Array.

    Read the line
    Determine if it is a L or C line
    Use Split to separate the line by comma's
    Use Split on the first entry by spaces
    You will now have a 3 member array for your Line or circle coordinates.

Posting Permissions

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



Click Here to Expand Forum to Full Width