|
Description
AddLayer() is used to add the next source layer to transfer to the DBTransferInfo object.
Call Signature
void AddLayer ( int/string filespec_src, string layer_type, int layer_src, int DBIW, int layer_dst )
Return Value
void
This has no return value.
Arguments
int/string filespec_src:
This can either be the handle returned by DBOpen(), or the name of an open file.
string layer_type:
This is the GDBShortLayerName for the type of the layer to be copied.
int layer_src:
This is the channel, or segment on the source file (filespec_src) to be transferred.
int DBIW:
The window on the input file to be read. This is only used for "IMG" and "BIT" layers. If 0, the whole input layer will be used.
int layer_dst:
The channel or segment to copy to the destination file (filespec_dest). If this is zero for a segment layers the function will try to create a new segment if possible.
Remarks
The first segment added using AddLayer is identified by an index value 1. The next one added by 2, and so on.
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.