Welcome to Golden Software Support



  • Avatar

    [05. Automation: New Features and Improvements]

    [Version] 20.0.163

    [Testing Results] -Create Base from Data map layers-

    The sample script from web page <<https://support.goldensoftware.com/hc/en-us/articles/360053542873>> was used as the starting point for this testing.

    The method "AddBaseMap" called in the script has no documentation in the web page or in the Help files.

    The code in line 10:
    Set dataLayer = Doc.Shapes.AddDataBaseLayer(Map:=map, ImportFileName:=Surfer.Path+"\samples\demoslice.bln")
    creates 5 points instead of the expected 4. The extra point comes from the first line in the BLN file. Editing the line to read:
    Set dataLayer = Doc.Shapes.AddDataBaseLayer(Map:=map, ImportFileName:=Surfer.Path+"\samples\demoslice.bln", ImportOptions:="DataBaseFirst=2")
    correctly creates the 4 points.

    The code in line 9:
    Set map = Doc.Shapes.AddBaseMap(Surfer.Path+"\samples\demoslice.bln")
    creates a map using the data limits of the 4 points in the BLN file. Meanwhile, the code in line 14:
    Set map2 = Doc.Shapes.AddDataBaseMap(Surfer.Path+"\samples\demoslice.bln")
    erroneously creates a map using the data limits of the 5 presumed points in the BLN file. Editing line 14 to read:
    Set map2 = Doc.Shapes.AddDataBaseMap(Surfer.Path+"\samples\demoslice.bln", ImportOptions:="DataBaseFirst=2")
    corrects the map creation and point import.

    Everything else seems to be working as intended.

    The methods "AddDataBaseLayer" and "AddDataBaseMap" should be revised so that code for the "ImportFileName" parameter correctly imports fixed-format files like BLN, by default, unless over-ridden by the "ImportOptions" parameter.
    The documentation for these two methods should also be revised as appropriate.



    Comment actions Permalink
  • Avatar
    Justine Carstairs

    Hi Norman,


    Thanks for your feedback! We won't have the Help and main website updated until the Beta version is ready for full release. This is currently true for all features that go into Bet, though in the future we would like to get the Help updated in time for Beta releases! :) 

    I'll add your vote for being able to automatically identify the header row when specific file types are used. I'm glad to hear that the methods worked as expected otherwise.


    Thanks again!




    Comment actions Permalink

Please sign in to leave a comment.