DBWriteHistory and DBReadHistory

Demonstrates how to read and write history record to a file.

Remarks

This example illustrates how to read and access the history record.

Code

! NOTE: EASI example is different to VB and Java.
!
! Perform a ratioing of two channels into a third. 
! Before starting an abort message is set, and 
! if the operation succeeds a descriptive 
! history record is written. 

 local integer tfid
 local string temp_file
 try
    temp_file = "./my.pix"
    delete temp_file noerror
    call CopyFile( GetPCIHOME() + "/demo/irvine.pix", \
                 temp_file)

    tfid = DBOpen(temp_file, "r+")
    call DBWriteHistory( tfid, "IMG", 3 ) 

    %{tfid,3} = %{tfid,2} / (%{tfid,1}+1)

    call DBWriteHistory( tfid, "IMG", 3, "Computed as ratio of Channels 1 and 2" )
    call DBClose( tfid )
 onerror
   print "Error: "+ GetLastErrorMessage()
 endonerror

Output

IMPProx:New History                                             13:58 23Jan2003 

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