Description
GetNewLayerNumber() is used to return the new layer number of a segment created on the output file.
Call Signature
int GetNewLayerNumber ( int index )
Return Value
int
The layer number of a segment created on the output file.
Argument
int index:
This is an index (starting at 1) of a segment added to the DBTransfer layer object by the AddLayer call.
Remarks
The first segment added using AddLayer is identified by an index value 1. The next one added by 2, and so on. The index is used to identify which transfered layer's new segment number on the output file is to be returned.
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.