{This modified script will give you a choice of delimiters and add the id and description fields from the stake record}
PROCEDURE Export_Stake_Data;
CONST
kCVS = 1; {comma delimited}
kTAB = 2; {tabbed delimited}
kSPC = 3; {space delimitied}
kDEC = 3; {decimal precision}
VAR
Filename:STRING;
delim: INTEGER;
PROCEDURE Write_Stake_Data(stkObj:HANDLE);
VAR
x,y,z:REAL;
eastStr,northStr,elevStr,idNo,desc,lineStr: STRING;
BEGIN
GetSymLoc3D(stkObj,x,y,z);
eastStr:= Num2Str(kDEC,x);
northStr:= Num2Str(kDEC,y);
elevStr:= Num2Str(kDEC,z);
idNo:= GetRField(stkObj,'Stake Object','ID');
desc:= GetRField(stkObj,'Stake Object','Data');
{format a line for each stake object. You may need to change the order of the
values to match the survey equipment. Delimeters may be a string or a character
as shown for the tab = Chr(9) but you would need to know the Ascii number.}
CASE delim OF
kCVS:
lineStr:= Concat(idNo,',',desc,',',northStr,',',eastStr,',',elevStr);
kTAB:
lineStr:= Concat(idNo,Chr(9),desc,Chr(9),northStr,Chr(9),eastStr,Chr(9),elevStr);
kSPC:
lineStr:= Concat(idNo,' ',desc,' ',northStr,' ',eastStr,' ',elevStr);
OTHERWISE
lineStr:= 'DELIMETER NOT SPECIFIED';
END;
{The next line writes the data}
WriteLn(lineStr);
END;
BEGIN
{Assign the delim value from the constants at the top}
delim:= kTAB;
PutFile('Write the Stake Export file:','Stake Export File.TXT',Filename);
ForEachObject(Write_Stake_Data,R IN ['Stake Object']);
Close(Filename);
END;
RUN(Export_Stake_Data);