LoadFile2 [Grid]
LoadFile2 loads the specified grid file. When the HeaderOnly parameter is set to 'True', only the header is loaded, not the entire grid. When the HeaderOnly parameter is set to 'False', the entire grid is loaded.
Syntax
object.LoadFile2( FileName, HeaderOnly, Options )
Parameter |
Type |
Required/ Optional |
Default |
Description |
FileName |
String |
Required |
|
This provides the path and file name of the grid file. |
HeaderOnly |
Boolean |
Required |
False |
This specifies whether the grid header would be loaded without loading the entire matrix of grid nodes |
Options |
Optional |
|
This specifies file specific import options string. |
Remarks
See Grid Import Options String for links to file type specific LoadFile2 import options.
Example 1
This example demonstrates how to load a new grid.
Grid.LoadFile2(FileName:=SurferApp.Path+"\Samples\demogrid.grd", HeaderOnly:=True)
Example 2
This example demonstrates how to load a new ZMAP grid file with an import options string.
Grid.LoadFile2(FileName:="C:\Surfer\Scripts\grid files\ZMAP_Skip.zmap", Options:="DontSkipExtra=1")
Used by: Grid object