Start a conversation

ASCII In Routine - Ignoring Lines of Information

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

#Freezing Rain

#48,2848.653,2500.910,222.060,

#49,2961.759,1267.528,258.241,

50,2999.392,1848.651,238.490,

51,3015.776,1214.240,260.711,

#52,3056.000,1378.978,252.708,

#We forgot to put a stake at this point so don't use it

53,3056.094,2073.078,231.068,

54,3061.092,2340.752,224.674,

55,3096.535,2606.109,216.054,

56,3104.129,2114.416,229.298,

57,3113.978,1966.860,231.951,

58,3117.394,1797.268,238.061,

# 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

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Jason Poitras

  2. Posted
  3. Updated

Comments