APSF //- This script exports the plan in a format suitable for CCD Commander. //- Paul Rodman, Jan 2010 //- //- V1.0 25 Jan 2010 //- Initial Release //- V1.1 25 Jan 2010 //- Minor changes (Juan Gonzalez) function FormatCoordinate(v as double) as string dim s as string s = format(abs(v),"00.000000") s = left(s,2)+"."+mid(s,4) // Force decimal period (.) while left(s,1)="0" and left(s,2)<>"0." s=mid(s,2) wend if v<0 then s="-"+s return s end function sub main() dim tf as APTextFile dim i as integer dim id,sra,sdec as string dim ob as APPlanObject // Create output file tf = WriteTextFile("","export.txt") if tf=nil then return // Output a line for each object for i = 1 to nObjects ob = Obj(i) id = ReplaceAll(ob.ID,",","-") // Replace any commas with hyphens id = ReplaceAll(id,"/","") // Remove the slash sign id = ReplaceAll(id," ","_") // Replace spaces tf.Write id+","+FormatCoordinate(ob.RA)+","+FormatCoordinate(ob.Dec)+chr(13)+chr(10) next tf.Close end sub main