DBWriteHistory()

  DBWriteHistory and DBReadHistory

Description

DBWriteHistory() is used to write a new history record.

Call Signature

void DBWriteHistory ( int/string filespec, string layer_type, string layer_index [, string history_msg] )

Return Value

void

This has no return value.

Arguments

int/string filespec:

This can either be the handle returned by DBOpen(), or the name of an open file.

string layer_type:

The name of the type of layer. This is either "FIL" for the overall file, "IMG" for an image channel or one of the segment types listed in DBNextSeg().

string layer_index:

The channel, or segment number. Ignored if layer_type is "FIL".

[ string history_msg ]:

The history message to be written. Many formats, including PCIDSK allow at most 56 characters per history message. If this argument is omitted an "Operation Aborted" message will be written to the layer history.

Remarks

Older history records are "pushed down", and for most formats at most eight records are kept.

If the history message isn't provided an "Operation Aborted" message is written to the layer. This is useful to mark a layer as being in an inconsistent state in case of task termination before completion. If the task is terminated before completion the abort message remains in the history while if the task completes normally it is normal to do a DBWriteHistory() with a message about the operation completed. Special logic causes the abort message to be overwritten by the new messages, rather than just push all the history down as would normally be the case.

When history records are written they are prepended with the name of the program writing them, and a time stamp is appended to the end.

See also

GDB file functions

DBReadHistory()

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.