'Circle2.bas creates a circular BLN file for SURFER. ' Update Sub main Debug.Print "-----";Time;" -----" Begin Dialog UserDialog 400,140,"Circle Origin and Radius" ' %GRID:10,7,1,1 TextBox 190,15,170,21,.OriginX TextBox 190,45,170,21,.OriginY TextBox 190,75,170,21,.Radius Text 30,15,140,21,"X Coordinate of Origin",.Text1 Text 30,45,140,21,"Y Coordinate of Origin",.Text2 Text 30,75,140,21,"Circle Radius",.Text3 OKButton 60,105,90,21 CancelButton 200,105,90,21 End Dialog Dim dlg As UserDialog On Error GoTo theend Dialog dlg On Error GoTo 0 originX = dlg.originX originY = dlg.originY radius = dlg.radius If originx = "" Or originy = "" Or radius = "" Then End 'originX= InputBox$( " What is the X coordinate of the circle origin") 'originY= InputBox$( " What is the Y coordinate of the circle origin") 'radius= InputBox$( " What is the radius of the circle" ) BLNFile=GetFilePath("circle.bln","bln", ,"Output BLN File",2) Debug.Print " PROCESSING INSTRUCTIONS - PLEASE WAIT . . ." xorigin=Val(originx) yorigin=Val(originy) rad=Val(radius) If BLNFile="" Then End Open BLNFile For Output As #1 Print #1, "37 0" For DEGREE= 0 To 360 Step 10 'Use 1 to blank inside. RADIAN = .0174603 * DEGREE Print #1, xorigin + RAD * Cos(RADIAN);" "; yorigin + RAD * Sin(RADIAN) Next Close #1 MsgBox( BLNFile +" has been created.",48) theend: End Sub