Open Table of Contents

ET GeoWizards Scripting

Transfer Polygon Attributes

(Go to the main page of the function)

Transfers the attributes from one polygon layer (source) to another (target) based on their spatial location (overlay). 

Syntax    

Dim ET As  New ETGW_Core
Set variable =  ET.TransferPolygonAttributes(pTargetFeatureClass, _
                            pSourceFeatureClass, sOutFileName, transferDic, sMessage)

The TransferPolygonAttributes method syntax has the following object qualifier and arguments:

Part Description
variable An IFeatureClass object
pTargetFeatureClass Required. An IFeatureClass object (Must be a Polygon feature class) - the polygon dataset  that will receive the attributes
pSourceFeatureClass Required. An IFeatureClass object  (Must be a Polygon feature class) - the polygon dataset which attributes will be transferred to the target layer
sOutFileName Required. A String - the full name of the output feature class (A feature class with the same full name should not exist)
transferDic Required. A Scripting Dictionary object that contains the field names to be transferred and the method used for transferring. The values of the items can be "Count", "Value", "Type" - case sensitive
Example:

Dim transferDic as Object
Set transferDic = CreateObject("Scripting.Dictionary")
transferDic.Add "POP1990", "Count"
transferDic.Add "Rainfall", "Value"
transferDic.Add "Soil_Type", "Type"

sMessage Optional. In a case of failure -  description of the cause. If the functions completes with success an empty string will be returned. 

Example