GXRA class

class geosoft.gx.GXRA
The RA class is used to access ASCII files sequentially or
by line number. The files are opened in read-only mode, so no
write operations are defined
static create((GXContext)ctx, (str)arg1) → GXRA:
Creates RA
Parameters:
Returns:

RA Object

Return type:

geosoft.gx.GXRA

New in version 5.0.0.

static create_sbf((GXContext)ctx, (GXSBF)arg1, (str)arg2) → GXRA:
Creates RA on an SBF
Parameters:
Returns:

RA Object

Return type:

geosoft.gx.GXRA

New in version 5.0.0.

Note:

This method allows you to open an RA in a structured file
storage (an SBF).  SBFs can be created inside other data
containers, such as workspaces, maps, images and databases.
This lets you store application specific information together
with the data to which it applies.

See also

sbf.gxh

gets((str_ref)arg1) → int:
Get next full line from RA
Parameters:arg1 (geosoft.gx.str_ref) – buffer in which to place string
Returns:0 - Ok 1 - End of file
Return type:int

New in version 5.0.0.

is_null() → bool

Check if the instance of geosoft.gx.GXRA is null (undefined)

Returns:True if this is a null instance of geosoft.gx.GXRA, False otherwise.
Return type:bool`
len() → int:
Returns the total number of lines in RA
Returns:# of lines in the RA.
Return type:int

New in version 5.0.0.

line() → int:
Returns current line #, 0 is the first
Returns:The current read line location.
Return type:int

New in version 5.0.0.

Note:

This will be the next line read.
static null() → GXRA

A null (undefined) instance of geosoft.gx.GXRA

Returns:A null geosoft.gx.GXRA
Return type:geosoft.gx.GXRA
seek((int)arg1) → int:
Position next read to specified line #
Parameters:arg1 (int) – line #, 0 is the first.
Returns:0 if seeked line is within the range of lines, 1 if outside range, line pointer will not be moved.
Return type:int

New in version 5.0.0.