I wanted to share some things I had to figure out the hard way to create ASCII outings for Pi Toolbox. Some of this may seem obvious, others I'm surprised not to find in the documentation. Sharing here in the hopes it saves someone else some time.
1) Make sure your header has a tab and not a space between "Version" and "2". For example:
writer.WriteLine("Version\t2");
2) Make sure your file encoding is ASCII encoding with the Windows 1252 codepage. I had issues with UTF8 not being recognized by Pi and without the 1252 codepage you can't create the correct degree and degree C symbols for units. For example:
var writer = new StreamWriter(outfile,false,Encoding.GetEncoding(1252))
3) If you want a channel that uses degrees as a unit to show up in Pi of type angle rather than user type, you need to replace words such as "deg" with B0 hex to get the degree symbol.
units = units.Replace("deg", "\xB0"); // Degree symbol
4) Similar if you have something with a unit name of "C" for Celsius. It'll show up as user type unless you change it to "\xB0\x43".
if (units == "C") units = "\xB0\x43"; // degrees Celsius symbol
5) More unit name fun. Standard gravities must be capital "G" not lower case "g".
if (units == "g") units = "G";
6) If you want your outing broken up in to laps, use this handy event block to define lap markers at the specified times. Fortunately, my source data had this available. Make sure you use tabs between the values in a row!
{EventBlock}
Time Name Category Source Message
0 End of lap Toolbox Added DRV End of lap
200.465 End of lap Toolbox Added DRV End of lap
295.602 End of lap Toolbox Added DRV End of lap
383.803 End of lap Toolbox Added DRV End of lap
468.066 End of lap Toolbox Added DRV End of lap
550.503 End of lap Toolbox Added DRV End of lap
633.415 End of lap Toolbox Added DRV End of lap
719.087 End of lap Toolbox Added DRV End of lap
803.455 End of lap Toolbox Added DRV End of lap
887.567 End of lap Toolbox Added DRV End of lap
972.451 End of lap Toolbox Added DRV End of lap
1067.162 End of lap Toolbox Added DRV End of lap