Table Editor Scripting Reference

The following table outlines the properties and methods available via the Table Editor Automation Interface. All method names are shown in yellow, and all properties are listed in green:

Item Name

Short Description

Long Description/Parameters

METHODS

 

 

Add()

Adds a Record or Column to the Table

Opaque function displaying the Insert dialog, allowing you to add either a new record (row) or column.

  •  If column is selected, the Insert Column screen displays.

  • If record is selected, a new row is added to the Table Editor component with no further input.

AddColumn()

Adds a column to the current table with interaction.

Opaque function. Shows the  Insert Column screen.

AddColumnX()

Adds a column to the current table without interaction.

Transparent function to allow the addition of a new column to the table. Accepts the following mandatory parameters:

Parameter

Type

Description

Name

String

The name of the column to be added.
The application expects column names to be a maximum of 8 characters.

Type

String

The data type of the column, either:

  • "a", "alphanumeric", "s" or "string" to define an alphanumeric field.

  • Any other value to define a numeric field.

Length

Long Integer

The maximum length (in characters) of the data to be held within the column.

Default

String

The default value of the column in the case of absent data.

Implicit

Boolean

True = implicit values

False = explicit values

 

The column index will be assigned as the next available integer (column is added to the far right of the table).

AddRecord()

Adds a record to the current table.

Adds a record to the end of the current table, as described in Add Record.

CacheAllRows()

Caches all records of the loaded set.

Create a copy of the loaded recordset in memory for more rapid subsequent access. Note that large datasets may cause reduced system performance if called.

Clear()

Removes the current record

Clears the contents of the currently active table cell, replacing it with the default value for that particular column by default, however, this behaviour is controlled by the ClearToDefault boolean:

  • If ClearToDefault is true then cell contents will be cleared to default values.

  • If ClearToDefault is false, cells will be cleared to an empty state.

Global access to this function is controlled by the CanClear boolean.

Copy()

Copies the current cell data

Copy the contents of the current cell to the clipboard. Access to this function is controlled by the CanCopy boolean.

Cut()

Cuts the current cell data

Cut the contents of the current cell to the clipboard. Access to this function is controlled by the CanCut boolean.

DefinitionEditor()

Displays the Definition Editor.

Displays the Definition Editor, allowing the definition of the selected column to be edited interactively, or to add/delete columns.

Delete()

Displays the Delete dialog.

Displays the Delete dialog allowing you to either delete the current record (row), or column in focus.

DeleteColumn()

Deletes the currently active Column.

Deletes the currently active column with no user input. Access to this function is controlled by the CanDeleteColumn boolean.

DeleteColumnX()

Deletes a specific column.

Used to delete any column on the table, even if not in focus. The following parameters are expected:

Parameter

Type

Description

Column

Long Integer

The Index of the column to be deleted (zero-based index, ignore the Record column).

 

DeleteRecord()

Deletes the currently active Record.

Deletes the currently active record (row) with no user input. Access to this function is controlled by the CanDeleteRecord boolean.

DeleteRecordX()

Deletes a specific record.

Used to delete any record (row) on the table, even if not in focus. The following parameters are expected:

Parameter

Type

Description

Record

Long Integer

The Record number to be deleted, as defined by the Record column.

 

FillDown()

Copy the currently selected cell content downward.

Proliferates the contents of the current cell to all records below it, in the current column. Access to this function is controlled by the CanFillDown boolean.

FillLeft()

Copy the currently selected cell content leftward.

Proliferates the contents of the current cell to all cells within the current record, to the left of the active cell.

Note that the resulting cells contents are defined by the column definition for each column, so may not be identical to the original cell:

  • If the originating cell is numeric, it may be truncated to the maximum length defined by another column.

  • String values will not be permitted in numeric columns, in which case, the default value will be substituted.

Access to this function is controlled by the CanFillLeft boolean.

FillRight()

Copy the currently selected cell content rightward.

Proliferates the contents of the current cell to all cells within the current record, to the left of the active cell.

Note that the resulting cells contents are defined by the column definition for each column, so may not be identical to the original cell:

  • If the originating cell is numeric, it may be truncated to the maximum length defined by another column.

  • String values will not be permitted in numeric columns, in which case, the default value will be substituted.

Access to this function is controlled by the CanFillRight boolean.

FillUp()

Copy the currently selected cell content upward.

Proliferates the contents of the current cell to all records above it, in the current column. Access to this function is controlled by the CanFillUp boolean.

Find()

Displays the Find dialog.

Displays the Find and Replace screen. Access to this function is controlled by the CanFind boolean.

FindNext()

Search again.

Search for the next instance of a predefined search string. Access to this function is controlled by the CanFindNext boolean.

FindPrev()

Search again (backwards).

Search for the previous instance of a predefined search string. Access to this function is controlled by the CanFindPrev boolean.

FindX()

Find a specified value.

Transparent command to allow you to search for a specified search value. The following mandatory parameters are expected:

Parameter

Type

Description

FindValue

String

The string to be searched for within the current file.

 

Goto()

Displays the Go to dialog.

Displays the Go to screen, to allow you to navigate to a specific column and record, shifting the focus of the active cell. Access to this function is controlled by the CanGoto boolean.

GotoX()

Go to a specific position in the table.

Transparent function to allow you to shift the active cell focus to a specified column and record. The following parameters are expected:

Parameter

Type

Description

Record

Long Integer

The number of a particular record within the loaded table.

Column

Long Integer

The index of a column within the loaded table (remember that the index for columns in zero-based, and does not include the Record column).

 

Insert()

Displays the Insert dialog

Displays the Insert dialog, allowing you to insert either a column definition or record. Subsequent dialogs depend on the selection made:

Access to the functions resulting from this dialog  is controlled by the CanInsertColumn and CanInsertRecord booleans.

InsertAssaysDef()

Insert the minimum columns required to define an Assays Definition

Update the current table by adding columns (and corresponding definitions) relevant to an Assays Definition. Access to this function is controlled by the CanInsertColumn boolean.

InsertBlastholePatternsDef()

Insert the minimum columns required to define a blasthole pattern.

Update the current table by adding columns (and corresponding definitions) relevant to a blasthole pattern file. Access to this function is controlled by the CanInsertColumn boolean.

InsertBlockModelDef()

Insert the minimum columns required to define a block model.

Update the current table by adding columns (and corresponding definitions) relevant to a block model. Access to this function is controlled by the CanInsertColumn boolean.

InsertCollarsDef()

Insert the minimum columns required to define a drillhole collar.

Update the current table by adding columns (and corresponding definitions) relevant to a drillhole collar. Access to this function is controlled by the CanInsertColumn boolean.

InsertColumn()

Displays the Insert Column dialog.

Add a new column with the Insert Column screen. Access to this function is controlled by the CanInsertColumn boolean.

InsertColumnX()

Insert a column dynamically.

Transparent function to insert a new column into the current table, at a specified position. The following parameters are expected:

Parameter

Type

Description

Column

Long Integer

Index value of the new column (zero-based, ignore Record column). Columns following the inserted column will have an incremented column index.

Name

String

The name of the column to be added.
The application expects column names to be a maximum of 8 characters.

Type

String

The data type of the column, either:

  • "a", "alphanumeric", "s" or "string" to define an alphanumeric field.

  • Any other value to define a numeric field.

Length

Long Integer

The maximum length (in characters) of the data to be held within the column.

Default

String

The default value of the column in the case of absent data.

Implicit

Boolean

True = implicit values

False = explicit values

 

InsertDefinition()

Displays the Insert Definition dialog.

Displays the Insert Definition screen, allowing a new column to be added interactively.

InsertDefinitionFromFile()

Insert a new column definition based on file contents.

Insert a new column based on the contents of a named definition file. The following parameters are expected:

Parameter

Type

Description

FilePath

String

The full path to the file containing the column definition data.

Note that this differs from the LoadDefinition() method in that the existing file is appended, as opposed to a completely new definition of columns being loaded..

InsertDependencyDef()

Insert the minimum columns required to define a dependency.

Update the current table by adding columns (and corresponding definitions) relevant to a dependency. Access to this function is controlled by the CanInsertColumn boolean.

InsertDownholeSurveyDef()

Insert the minimum columns required to define a downhole survey.

Update the current table by adding columns (and corresponding definitions) relevant to a downhole survey. Access to this function is controlled by the CanInsertColumn boolean.

InsertDrillholeDef()

Insert the minimum columns required to define a drillhole.

Update the current table by adding columns (and corresponding definitions) relevant to a drillhole. Access to this function is controlled by the CanInsertColumn boolean.

InsertPlotFileDef()

Insert the minimum columns required to define a plot file.

Update the current table by adding columns (and corresponding definitions) relevant to a plot file. Access to this function is controlled by the CanInsertColumn boolean.

InsertPlotterFilterDef()

Insert the minimum columns required to define a plotter filter.

Update the current table by adding columns (and corresponding definitions) relevant to a plotter filter. Access to this function is controlled by the CanInsertColumn boolean.

InsertPlotterPenDef()

Insert the minimum columns required to define a plotter pen.

Update the current table by adding columns (and corresponding definitions) relevant to a plotter pen. Access to this function is controlled by the CanInsertColumn boolean.

InsertPointsDef()

Insert the minimum columns required to define point data.

Update the current table by adding columns (and corresponding definitions) relevant to point data. Access to this function is controlled by the CanInsertColumn boolean.

InsertRecord()

Insert a new record.

Insert a new record to the end of the table, with the next available record number being used.  Access to this function is controlled by the CanInsertRecord boolean.

InsertRecordX()

Insert a new record at a specific position.

Insert a new record into the loaded file by specifying its record number. All records following the insert record position will be automatically incremented. The following parameters are expected:

Parameter

Type

Description

Record

Long Integer

An integer representing the position within the loaded table that the new record should be inserted.

InsertResultsDef()

Insert the minimum columns required to define a results file.

Update the current table by adding columns (and corresponding definitions) relevant to a results file. Access to this function is controlled by the CanInsertColumn boolean.

InsertRosetteDef()

Insert the minimum columns required to define a rosette.

Update the current table by adding columns (and corresponding definitions) relevant to a rosette. Access to this function is controlled by the CanInsertColumn boolean.

InsertScheduleDef()

Insert the minimum columns required to define a mine schedule.

Update the current table by adding columns (and corresponding definitions) relevant to a mine schedule. Access to this function is controlled by the CanInsertColumn boolean.

InsertSectionDefinitionCompDef()

Insert the minimum columns required to define a complex section definition.

Update the current table by adding columns (and corresponding definitions) relevant to a complex section definition. Access to this function is controlled by the CanInsertColumn boolean.

InsertSectionDefinitionMinDef()

Insert the minimum columns required to define a simple section definition.

Update the current table by adding columns (and corresponding definitions) relevant to a simple section definition. Access to this function is controlled by the CanInsertColumn boolean.

InsertStringsDef()

Insert the minimum columns required to define string data.

Update the current table by adding columns (and corresponding definitions) relevant to string data. Access to this function is controlled by the CanInsertColumn boolean.

InsertVarExpDef()

 

 

Insert the minimum columns required to define an experimental variogram.

Update the current table by adding columns (and corresponding definitions) relevant to an experimental variogram model (note that these files are normally generated by the VGRAM process. Access to this function is controlled by the CanInsertColumn boolean.

InsertVarModelDef()

Insert the minimum columns required to define a variogram mdoel.

Update the current table by adding columns (and corresponding definitions) relevant to a variogram model. Access to this function is controlled by the CanInsertColumn boolean.

InsertWireframePointsDef()

Insert the minimum columns required to define wireframe point data.

Update the current table by adding columns (and corresponding definitions) relevant to wireframe point data. Access to this function is controlled by the CanInsertColumn boolean.

InsertWireframeTrianglesDef()

Insert the minimum columns required to define wireframe triangle data.

Update the current table by adding columns (and corresponding definitions) relevant to wireframe triangle data. Access to this function is controlled by the CanInsertColumn boolean.

LoadDefinition()

Load new column definitions.

Load a new set of columns, replacing the existing table display, according to the contents of a specified definition file. The following parameters are expected:

Parameter

Type

Description

FilePath

String

The full path to the file containing the column definition data.

 

This method differs from the LoadDefinitionFromFile() method in that all existing table data is replaced by the contents of the external file.  Access to this function is controlled by the CanLoadDefinition boolean.

MoveFirst()

Move to the first record.

Make the first row in the table selected. Access to this function is controlled by the CanMoveFirst boolean.

MoveLast()

Move to the last record.

Make the last row in the table selected. Access to this function is controlled by the CanMoveLast boolean.

MoveNext()

Move to the next record.

Make the next row in the table selected. Access to this function is controlled by the CanMoveNext boolean.

MovePrev()

Move to the previous record.

Make the previous row in the table selected. Access to this function is controlled by the CanMovePrev boolean.

New()

Create a new table.

Creates a new table, removing the contents of the current table from memory.

Warning: This method does not incorporate validation for saving changes to existing data; if you are scripting this command, it is important that you make a call to Save() or SaveAs() or one of the export facilities, if you need to preserve current table data.

Open()

Displays the Open dialog.

Displays the Open screen, allowing you to select a Datamine format file to be loaded into the current Table Editor component.

OpenCSV()

Open a comma-delimited file.

Loads the contents of an external comma-delimited (CSV) file into the Table Editor component. This function can be used in one of two ways:

  • to open a named file within the current table editor (as a transparent function)

  • to display the Open dialog, allowing a file to be selected for loading (mimicking the Open() method).

The following parameters are mandatory:

Parameter

Type

Description

FilePath

String

The full qualified path to an existing CSV file. If an empty string is passed, the Open File dialog will be shown, filtered to show only comma-delimited files.

Access to this function is controlled by the CanOpenCSV boolean.

OpenFile()

Opens a named file.

This function can be used in one of two ways:

  • to open a named file within the current table editor (as a transparent function)

  • to display the Open dialog, allowing a file to be selected for loading (mimicking the Open() method).

The following parameters are mandatory:

Parameter

Type

Description

FilePath

String

The full qualified path to an existing Datamine format file. If an empty string is passed, the Open File dialog will be shown.

ReadOnly

Boolean

Controls read and write access for the opened file.

True = open the file as read only.

False = open the file as read/write.

CacheAll

Boolean

Determine if the full contents of the opened file are cached in memory.

True = contents are cached.

False = contents are not cached.

If cached, subsequent table access is quicker, however, care should be taken with larger files to ensure system performance is not affected adversely.

Paste()

Paste the contents of the clipboard.

Paste the contents of the clipboard to the currently active cell. Access to this function is controlled by the CanPaste boolean.

PrecisionConverter()

Displays the Precision Converter dialog.

Displays the Precision Converter screen.

Properties()

Displays the File Properties dialog.

Displays the File Properties dialog. If a file has not been loaded into the Table Editor already, the description of the file will begin "File created by Table Editor..." followed by the date and time.

Redo()

Redo the previous command.

Redo the previous command. Access to this function is controlled by the CanRedo boolean.

Replace()

Display the Find/Replace dialog.

Display the Find/Replace dialog, open at the Replace tab. Access to this function is controlled by the CanReplace boolean.

ReplaceAllX()

Search for and replace all instances of a string.

A transparent function allowing you to replace all instances of a given string with another specified string. The following parameters are expected:

Parameter

Type

Description

FindValue

String

The string to be replaced within the current table.

ReplaceValue

String

The value to replace the original string when found.

RunFormula()

Displays the Run Formula dialog.

Displays the Run Formula screen to allow conditional formula(e) to be applied across the current table. Access to this function is controlled by the CanRunFormula boolean.

Save()

Save the current table data.

Save the current table data, updating the currently loaded file.

SaveAs()

Displays the Save as dialog, or saves the file with a specified name.

This function can be used in either of two ways.

  • To display the Save as screen.

  • To save the current table under a specified file name.

The following parameters are expected:

Parameter

Type

Description

FilePath

String

The full path to be used when saving the current file. Pass an empty string to display the Save as dialog.

 

Note that if an existing file is specified, you will need to confirm interactively if an overwrite is permitted.

SaveAs2()

Displays the Save as dialog, or saves the file with a specified name allowing optional prompt-free overwriting.

This function can be used in either of two ways.

  • to display the Save as screen

  • to save the current table under a specified file name, possibly overwriting an existing file if it is found.

The following parameters are expected:

Parameter

Type

Description

FilePath

String

The full path to be used when saving the current file. Pass an empty string to display the Save as dialog.

 

OverwriteExisting

Boolean

If set to True, any existing files matching the FilePath will be overwritten without prompts.

If False, existing file data will not be overwritten if it is found.

SaveAsCSV()

Save the current table data in comma-delimited format.

This function can be used in either of two ways.

  • to display the Save as screen

  • to save the current table in comma-delimited format under a specified file name

The following parameters are expected:

Parameter

Type

Description

FilePath

String

The full path to be used when saving the current file. Pass an empty string to display the Save as dialog.

  Access to this function is controlled by the CanSaveCSV boolean.

SaveDefinitionAs()

Save the current column definitions as XML.

Save the current column definitions to an external XML format file.

The following parameters are expected:

Parameter

Type

Description

FilePath

String

The full path to be used when saving the current file. Pass an empty string to display the Save Definition as dialog.

 

 

SelectAll()

Select the full table

Select the entire contents of the table. Access to this function is controlled by the CanSelectAll  boolean.

Undo()

Undo the last command.

Undo the last command, based on the contents of Object.UndoDescription. Access to this function is controlled by the CanUndo boolean.

UpdateColumnX()

Update the definition of a specific  column dynamically.

A transparent function to update the definition of any column within the loaded table. The following mandatory parameters are expected:

Parameter

Type

Description

Column

Long Integer

An integer representing the zero-based index of the column to be updated (remember that the Record column should be ignored).

Name

String

The name of the column to be added.
The application expects column names to be a maximum of 8 characters.

Type

String

The data type of the column, either:

  • "a", "alphanumeric", "s" or "string" to define an alphanumeric field.

  • Any other value to define a numeric field.

Length

Long Integer

The maximum length (in characters) of the data to be held within the column.

Default

String

The default value of the column in the case of absent data.

Implicit

Boolean

True = implicit values

False = explicit values

PROPERTIES

Data Type

Description

ColumnImplicit()

Boolean

For the Column represented by the CurrentColumn index, this property is used to set or return a boolean representing whether the column contains implicit (true) or explicit (false) values.

This property expects the following parameters:

Parameter

Type

Description

Column

Long Integer

Represents the index value of a column.

 

ColumnName()

String

For the Column represented by the CurrentColumn index, this property is used to set or return a string representing the name of the current column. Note that Datamine files expect column names to be no longer than 8 characters.

This property expects the following parameters:

Parameter

Type

Description

Column

Long Integer

Represents the index value of a column.

ColumnType()

String

For the Column represented by the CurrentColumn index, this property is used to set or return a string representing the type of data contained within. The following constant values are permitted:

  • "a"

  • "alphanumeric"

  • "s"

  • "string"

Any value passed not corresponding to the above will be interpreted as the column containing a numeric data type.

This property expects the following parameters:

Parameter

Type

Description

Column

Long Integer

Represents the index value of a column.

ColumnDefault()

String

For the Column represented by the CurrentColumn index, this property is used to set or return a string representing the default value of the cells within the column.

This property expects the following parameters:

Parameter

Type

Description

Column

Long Integer

Represents the index value of a column.

CanClear

Boolean

Boolean defining whether the Clear() function can be called for the current table, regardless of the ClearToDefault property.

CanCopy

Boolean

Boolean defining whether the Copy() function can be called.

CanCut

Boolean

Boolean defining whether the Cut() function can be called.

CanDeleteColumn

Boolean

Boolean defining whether the DeleteColumn() function can be called.

CanDeleteRecord

Boolean

Boolean defining whether the DeleteRecord() function can be called.

CanEdit

Boolean

Boolean defining whether the contents of the current table can be edited.

CanEditDefinition

Boolean

Boolean defining whether the definition of columns can be edited.

CanFillDown

Boolean

Boolean defining whether the FillDown() function can be called.

CanFillLeft

Boolean

Boolean defining whether the FillLeft() function can be called.

CanFillRight

Boolean

Boolean defining whether the FillRight() function can be called.

CanFillUp

Boolean

Boolean defining whether the FillUp() function can be called.

CanFind

Boolean

Boolean defining whether the Find() function can be called.

CanFindNext

Boolean

Boolean defining whether the FindNext() function can be called.

CanFindPrev

Boolean

Boolean defining whether the FindPrev() function can be called.

CanGoto

Boolean

Boolean defining whether the Goto() function can be called.

CanInsertColumn

Boolean

Boolean defining whether the InsertColumn() function can be called.

CanInsertRecord

Boolean

Boolean defining whether the InsertRecord() function can be called.

CanLoadDefinition

Boolean

Boolean defining whether the LoadDefinition() function can be called.

CanMoveFirst

Boolean

Boolean defining whether the MoveFirst() function can be called.

CanMoveLast

Boolean

Boolean defining whether the MoveLast() function can be called.

CanMoveNext

Boolean

Boolean defining whether the MoveNext() function can be called.

CanMovePrev

Boolean

Boolean defining whether the MovePrev() function can be called.

CanOpenCSV

Boolean

Boolean defining whether the OpenCSV() function can be called.

CanPaste

Boolean

Boolean defining whether the Paste() function can be called.

CanRedo

Boolean

Boolean defining whether the Redo() function can be called.

CanReplace

Boolean

Boolean defining whether the Replace() function can be called.

CanRunFormula

Boolean

Boolean defining whether the RunFormula() function can be called.

CanSaveCSV

Boolean

Boolean defining whether the SaveAsCSV() function can be called.

CanSaveDefinitionAs

Boolean

Boolean defining whether the SaveDefinitionAs() function can be called.

CanSelectAll

Boolean

Boolean defining whether the SelectAll() function can be called.

CanUndo

Boolean

Boolean defining whether the Undo() function can be called.

ClearToDefaultValues

Boolean

Boolean that represents how the Clear() function is performed:

  • If true, default values will be added to cells that are cleared.

  • If false, cell contents will be empty after clearing.

ColumnCount

Long Integer

Returns an integer representing the number of columns in the current table.

CurrentColumn

Long Integer

Read-only. Returns the column index for the currently selected column.

ColumnIndex()

Long Integer

Returns the index of the named column.

This property expects the following parameters:

Parameter

Type

Description

Name

String

Represents the name of a column.

ColumnLength()

Long Integer

Returns the maximum length of the field permitted for a specified column.

This property expects the following parameters:

Parameter

Type

Description

Column

Long Integer

Represents the index value of a column.

CurrentFieldValue

String

Returns the value held within the active table cell.

CurrentRecord

String

Returns the record number for the currently selected data.

EnableContextMenu

Boolean

True = context menu enabled, false = disabled context menu.

EnableKeyboardShortcuts

Boolean

True = enable shortcuts, false = disable shortcuts.

FilePath

String

A string represent the full file path to the currently loaded table.

HelpFilePath

String

A string represent the full file path to the context Help for the Table Editor.

ReadOnly

Boolean

Represents the read/write status of the loaded table. True = read only, False = read/write.

RecordCount

Long Integer

An integer representing the total number of records in the loaded table.

RedoDescription

String

The current description of the command to be re-done.

TableDescription

String

Represents the file description for the loaded file.

TableModified

Boolean

Boolean representing if changes have been made to the current data set. False = no changes made, True = changes made. Commonly used in conjunction with the Save() method to ensure changes are saved.

TablePrecision

Boolean

Boolean representing the current precision status of the loaded file.

False = single precision

True = extended precision

UndoDescription

String

The current description of the command to be undone.