Description
SetProgressCounter() is used to set the progress counter function and argument to be used, during the transfer.
Call Signature
void SetProgressCounter ( function user_progress_func [, char ptr arg_pointer] )
Return Value
void
This has no return value.
Arguments
function user_progress_func:
A user defined function with three Arguments that will be called when each progress update is recieved. If 'ProgressCounter' is given, the default progress counter is used and no user function needs to be defined.
[ char ptr arg_pointer ]:
If this argument is present, this is the pointer to a character array to be passed to the user progress function. The length of the array is unknown by EASI, and assumed to be a very large value. f$len() should not be used to determine its length.
Remarks
If not called, the default GDBTransferLayer API counter is used.
Example
This example shows how the DBTransfer intrinsic may be used to transfer a segment from one file to another:
define function M_CopySegment( fdin,fdout,layer_type,SegIn,poModule )
local int SegOut
local DBTransferInfo ti
try
call ti.SetDestFile(fdout)
call ti.SetProgressCounter(ModuleProgressFunc,poModule)
call ti.AddLayer(fdin,layer_type,SegIn,0,0)
call ti.Transfer()
SegOut= ti.GetNewLayerNumber(1)
call DBSync( fdout )
onerror
SegOut = -1
endonerror
return SegOut
enddefine
See also
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.