Automated Task Scripts for Surfer

 

We have a number of useful scripts that Surfer owners can download for free.  If you see one you think you'd like to try, just click on the name of the script to download it to your machine.

Scripts for Surfer Version 9   *   Scripts for Surfer Version 8   *  
Scripts for Surfer Version 7   *
   Scripts for Surfer Versions 6 and Earlier


Scripts for Surfer Version 9

In addition to the scripts below, there are over 35 additional sample scripts in the Surfer Samples folder, located in the installation directory. If you wish to download all of the Surfer 9 scripts at once, they are available in a zip file.
  • background.bas:  Shows how to use background color. 
  • Blank0.bas:  Replaces the blanking value in a grid file with 0. 
  • BlankByLevel.bas:  Blanks a grid file above or below a given Z value.
  • BlankValue.bas: Converts the blank value in a grid file to another value.
  • BreakApart.bas:  Shows how to break apart a map from a map frame.
  • circle2.bas:  Creates a circular BLN file.
  • client.cs:  Demonstrates how to control surfer from a C# class. 
  • colorlines.bas:  Creates a rainbow level file for contour lines. 
  • colorlinesfills.bas:  Creates a rainbow level file for contour lines and filled contours. 
  • contarea2.bas:  Calculates the area between contours. 
  • contourfill.bas:  Demonstrates how to fill a contour map with a user defined range. 
  • CopyPasteMaps.bas:  Demonstrates how to copy a map from one plot document window and paste into another.
  • CrossSection.bas:  Creates a contour map and cross section.
  • crv2xyz9.zip - Converts cylindrical or spherical coordinates to xyz coordinates.
  • DistanceCalc.bas:  Calculates the distance between the first two digitized points.
  • DXF_Extents.bas: Reads the true extents from the DXF file and uses this information to set the base map limits. This is useful when the DXF file imports with large extents due to 3D extrusions or other unsupported objects.
  • dxf2xyz.bas:  Extracts X, Y, and Z information from 3D DXF files. 
  • Export2Base.bas:  Exports all non-map items to DXF, loads the DXF as a base map and overlays it with the existing map.
  • ExportBitmap.bas:  Demonstrates how to export to a bitmap file. 
  • ExportSelectedOnly.bas:  Demonstrates how to export selected objects only.
  • ExtractDatafromPost.bas:  Extract a data file from a Surfer plot file Post Map or Classed Post Map. 
  • ExtractGridFile.bas:  Extracts the grid file from a SRF file. 
  • GridAll.bas: Grids all of specified types of data files in the specified directory.
  • GridBlank.bas:  Demonstrates how to blank a grid file with a BLN file.
  • GridConvert.bas:  Demonstrates how to convert a grid file from one file format to another.
  • GridHeader.bas:  Lets you edit the XY min max values in the grid header. Works with DEM and DDF (SDTS) files. 
  • GridInterpolate.bas:  Returns the Z values from the grid at the XY locations specified in the data file. 
  • GridMath.bas:  Shows how to use the grid math command including functions.
  • GridResiduals.bas:  Calculate the difference between the original Z values in the data file and the Z value in the grid file.
  • GridSpacing.bas:  Creates a GRD file with user defined grid spacing.
  • GridVolume.bas:  Calculates the volume and area of a grid file and writes the results to the worksheet.
  • HideAxes.bas: Eliminates ticks and labels and hides axes from selected maps in an open SRF file.HideAxes.bas: Eliminates ticks and labels and hides axes from selected maps in an open SRF file.
  • Jackknife.bas:  Grids the data set n times, leaving one of the data points out each time. Also known as cross-validation. 
  • Loop-ConsecutiveDataFileName.bas:  Starts a loop to grid, contour, and print out separate data files that are saved with consecutive names (ie. datafile1.dat, datafile2.dat, etc).
  • Loop-ExportGIF.bas:  Creates a 3D surface map and rotates it by 5 degrees and exports a GIF for each rotation.
  • Loop-SelectDataFile.bas:  Loops the process of selecting a data file, gridding the data, creating a map, and saving the SRF file.
  • MapScale.bas:  Demonstrates how to change the scale of the map. 
  • Matlab2BLN.bas:  Converts a Matlab coastline file to BLN format.
  • Matrix2XYZ.bas:  Converts a worksheet in matrix format to an XYZ data file.
  • naming.bas:  Demonstrates how to name the map frame and contour map objects. 
  • Multisheet XLS.bas:  Shows how to specify a particular sheet in an Excel XLS file to use for gridding.
  • OnError.bas:  Shows how to set error handling in Scripter
  • Open SRF Select Map.bas:  Demonstrates how to open an SRF file and select a map for editing.
  • PrintAllSrf.bas:  Prints all the SRF files in the specified directory with the path and file name. 
  • rainbow.bas:  Creates a rainbow fill level file for filled contours. 
  • Replace.bas:  Shows how to replace a value in the worksheet with another value.
  • ReplaceNodes.bas:  Replace all Z values equal to or above a certain value with another value.
  • SelectGridFile.bas:  Shows how to open a dialog box to select a grid file to use.
  • sizemove.bas:  Demonstrates how to resize and move map objects. 
  • SMT2GRD.bas:  Converts IsoMap format ASCII grid file exported by Kingdom Suite into Surfer binary format grid.
  • Transparency.bas:  Shows how to set the opacity for a map layer, for a color fill, and for contour color fill
  • VarioExport.bas:  Exports the variogram for each 1 degree step, saves to a DAT, and then creates an image map of the full variogram. 
  • Visibility of Axis OFF.bas:  Shows how to turn off the visibility of an axis.
  • Visibility of Map OFF.bas:  Shows how to turn off the visibility of a map layer.
  • Which Surfer Version.bas:  Shows how to specify which version of Surfer to use to run the script.
  • WorksheetComparison.bas:  Clears or deletes data in a particular column in the worksheet if it is equal to the value in another cell.
  • WorksheetDeleteRow.bas:  Deletes a row of data in the worksheet if a cell in a particular column meets specified criteria.
  • Zcolumn.bas:  Grids data with consecutive Z column each loop, saves GRD file and creates contour map each time. 
  • ZoomRectangle.bas:  Utilizes ZoomRectangle to zoom into the corners of a map layer.

Scripts for Surfer Version 8

If you wish to download all of the Surfer 8 scripts at once, they are available in a zip file.

  • arc2grd3.bas – Converts an ESRI grid file to Surfer ASCII GRD format.
  • AreaLengthBln.bas – Calculates the area of polygons and the length of polylines and polygons in a BLN file.
  • background.bas – Shows how to use background color.
  • bil2grd3.bas – Converts a BIL file with HDR, STX, and BLW files from the USGS NED Seamless Data web page to a Surfer GRD file.
  • Blank0.bas – Replaces the blanking value in a grid file with 0.
  • circle2.bas – Creates a circular BLN file for SURFER.
  • client.cs – Demonstrates how to control surfer from a C# class.
  • colorlines.bas – Creates a rainbow level file for contour lines.
  • colorlinesfills.bas – Creates a rainbow level file for contour lines and filled contours.
  • contarea2.bas – Calculates the area between contours.
  • contourfill.bas – Demonstrates how to fill a contour map with a user defined range.
  • DistanceCalc.bas – Calculates the distance between the last two digitized points.
  • dxf2xyz.bas – Extracts X, Y, and Z information from 3D DXF files.
  • expbit.bas – Demonstrates how to export to a bitmap file.
  • Export2Base.BAS – Exports all non-map items to DXF, loads the DXF as a base map and overlays it with the existing map.
  • Extract_post_from_srf rev2a.bas – Extract a data file from a Surfer plot file Post Map or Classed Post Map.
  • Grd2Arc.bas – Converts a Surfer GRD file to ArcView, ArcINFO, Spatial Analyst ASC format.
  • Grd2Lat.bas – Converts a GRD or DEM file to a 2D curvilinear LAT file for Voxler.
  • GridExtractFromSrf.bas – Extracts the grid file from a SRF file.
  • GridHeader.bas – Lets you edit the XY min max values in the grid header. Works with DEM and DDF (SDTS) files.
  • gridinfo.bas – Displays the grid information.
  • GridInterpolate.bas – Returns the Z values from the grid at the XY locations specified in the data file.
  • gridmath.bas – Shows how to use the grid math command including functions
  • GridSpacing.BAS – Creates a GRD file with user defined grid spacing.
  • Jackknife.BAS – Grids the data set n times, leaving one of the data points out each time. Also known as cross-validation.
  • mapscale.bas – Demonstrates how to change the MapScale.
  • naming.bas – Demonstrates how to name the mapframe and contour map objects.
  • OverlayMapScaleLimits.BAS – Overlays all maps in the current window keeping the scale, limits, and position of the selected map.
  • PrintAllSrf.bas – Prints all the SRF files in the specified directory with the path and file name.
  • rainbow.bas – Creates a rainbow fill level file for filled contours.
  • Refresh.BAS – Refreshes the grid and data files in all the overlays in a single map and maintains the scale and limits.
  • sizemove.bas – Demonstrates how to resize and move map objects.
  • TifTfwExport3.bas – Exports a TIF file with an associated TFW file.
  • TifTfwLF.bas – Imports a TIF file with an associated TFW file.
  • VarioExport.bas – Exports the variogram for each 1 degree step, saves to a DAT, and then creates an image map of the full variogram.
  • zcolumn.bas – Grids data with a new Z column each loop, saves GRD file each time.

Scripts for Surfer Version 7

  • background.bas – Shows how to use background color.
  • colorlines.bas – Creates a rainbow level file for contour lines.
  • colorlinesfills.bas – Creates a rainbow level file for contour lines and filled contours.
  • contarea.bas – Calculates the area between contours.
  • contourfill.bas – Demonstrates how to fill a contour map with a user defined range.
  • dxf2xyz.bas – Extracts X, Y, and Z information from 3D DXF files.
  • expbit.bas – Demonstrates how to export to a bitmap file.
  • gridinfo.bas – Gets grid information from the grid volume report.
  • gridmath.bas – Shows how to use the grid math command including functions
  • mapscale.bas – Demonstrates how to change the MapScale.
  • naming.bas – Demonstrates how to name the mapframe and contour map objects.
  • rainbow.bas – Creates a rainbow fill level file for filled contours.
  • sizemove.bas – Demonstrates how to resize and move map objects.
  • zcolumn.exe – Grids data with a new Z column each loop, saves GRD file each time.

Scripts for Surfer Versions 6 and Earlier

  • background.bas – Shows how to use background color.
  • cont2xyz.bas – Creates a file containing the xy and z coordinates of contour lines.
  • contarea.bas – Calculates the area between contours.
  • crv2xyz.exe – Converts cylindrical or spherical coordinates to xyz coordinates.
  • dxf2xyz.bas – Extracts X, Y, and Z information from 3D DXF files.
  • editoverlay.bas – Name layers in order to overlay and edit them.
  • gridinfo.bas – Get grid information from the grid volume report.
  • gridmath.bas – Shows how to use the grid math command including functions.
  • mapscale.bas – Demonstrates MapScale command.
  • naming.bas – Demonstrates ID and EditSetObjectID commands.
  • rainbow.bas – Creates a rainbow fill level file for filled contours.
  • sizemove.bas – Creates 2 maps each with overlays and places them on different parts of the page.
  • vb4.bas – Shows how to call Surfer from VB4.
  • vb3.bas – Shows how to call Surfer from VB3 and VBA.
  • zcolumn.bas – Grids data with a new Z column each loop, saves GRD file each time.

 

Home * Products * Gallery * Support * About Us * Register * Order * Demos * Sitemap

Privacy Policy