ASCII In Routine - Ignoring Lines of Information
Posted by Jason Poitras on 20 January 2010 12:52 PM
Have you ever had an ASCII file that contained header or footer lines, or contains lines of data that you do not want to import or has lines part way through the file that are comments, and it simply can't be brought into the program without removing and losing all that information? There is an option in MSCAD2005 that may assist you, that is not documented.‚ To tell our ASCII in routine to ignore or skip over a line, simply add the character # to the front of each line, to ignore and skip, using Wordpad.
Sample ASCII file:
#January 10, 2006
#We forgot to put a stake at this point so don't use it
# Finished the job right on time!
In this simple example; The first 2 lines would represent headers and by adding the # character they will now be ignored and skipped over when this file is imported. Point numbers 48, 49, and 52 would also be skipped and not read in. The line after Point 52 is a comment line that was added with the # at the front, it too would be skipped and ignored. The last line would represent a footer and with the # character it too is ignored and skipped when the file is imported. So you simply add the # character - then the information can remain in the file and not be lost.‚ The information will still be there if you print your file out via Wordpad but not interfere with the import of the valid data during an ASCII import. The ASCII in command is found in MSCAD2005 under the MsPoints menu; Import ASCII Points or Lat Long File.
Glen W. Cameron, C.E.T.
Technical Support Manager