Welcome to Golden Software Support

Surf.GridData

Comments

5 comments

  • Avatar
    Leslie McWhirter

    Hello Sayce,

    Surfer 13 uses the same Scripter syntax as did Surfer 9, so your script should run as-is. In certain circumstances additional functionality has been added to a new command (like additional gridding options in GridData2), but the original command should still word (GridData in this case). I recommend trying to run your script and then if you experience any errors or issues, you can begin debugging the script.

    We have a training video aimed at debugging with Scripter.

    Thanks!

    Leslie

    0
    Comment actions Permalink
  • Avatar
    Andrew Sayce

    Hi,

    I followed the first webinar example "Griddata_Comparison.bas" and I get a Scripter Error pop up after I select the xyz columns, error reads:

    (&H80020009) Unable to open 'C:\Program Files\Golden Software\Surfer 13\Samples\Demogrid.dat_InverseDistance.grd'. Access is denied.

    How is this fixed?

    0
    Comment actions Permalink
  • Avatar
    Leslie McWhirter

    Hello Sayce,

    My apologies for the delay in answering you. With regards to GridMethod what number with options are available? For the GridData command, the gridding method is called Algorithm.

    The enumeration options for SrfGridAlgorithm are:

    • srfInverseDistance
    • srfKriging
    • srfMinCurvature
    • srfShepards
    • srfNaturalNeighbor
    • srfNearestNeighbor
    • srfRegression
    • srfRadialBasis
    • srfTriangulation
    • srfMovingAverage
    • srfDataMetrics
    • srfLocalPolynomial

    You can find this on the GridData Help page, by scrolling down to Algorithm in the table and clicking on SrfGridAlgorithm. In order to use the Blank outside convex hull option, you will need to use the GridData3 command instead of GridData.

    The command would be something like this:

    SurferApp.GridData3(DataFile:="c:\test\digitized.dat", OutGrid:="c:\test\digitized.grd", Algorithm:=srfKriging, BlankOutsideHull:=1) 

    Thanks!

    Leslie

    0
    Comment actions Permalink
  • Avatar
    Andrew Sayce
    Leslie, Can I have some assistance with upgrading my old Surfer script to match Surfer13 syntax? I've been thrown in the deep end with no VBA experience. thanks
    0
    Comment actions Permalink
  • Avatar
    Leslie McWhirter

    Hello Sayce,

    If access is denied to the Program Files directory, it likely means you have not run Scripter and Surfer as an administrator. After doing so, if you still see this error, try moving the necessary files to somewhere you do have permission (such as the Desktop) and then change the file paths in the script before running it.

    Thanks!

    Leslie

    0
    Comment actions Permalink

Please sign in to leave a comment.