Concatenate two different_attribute_fields_in_arc_gis

Post on 12-May-2015

332 views 0 download

Tags:

Transcript of Concatenate two different_attribute_fields_in_arc_gis

Concatenate two differentConcatenate two different attribute fields in ArcGIS using 

VBA Logic Script

By Ashok Peddi

peddiasok@gmail.com

Open ArcGIS from Start >All Programs >ArcGIS >ArcMapStart‐>All Programs‐>ArcGIS‐>ArcMap

If you have aIf you have a shape file add it to Arc Map

OpenOpen Attribute 

table by right clicking onclicking on 

the shape file in table of 

t tcontents

Add a field by click on Options‐>Add FieldAdd Field

The field which you haveyou have created recently will be added to the 

b blAttribute table

Fi ld C l l tField Calculator window will open like this 

Right Click on the field(Which 

you have created  just 

now)and select Field CalculatorField Calculator

Check the advanced check box 

then the Pre‐L i VBALogic VBA Script 

window will be openbe open 

Declare a variable IdNo as we declare inIdNo as we declare in VB as String . Assign any column filed to it 

hi h t twhich you want to merge or concatenate in the Per‐Logic VBA Script Code Window.Then Concatenate any text or number to ittext or number to it 

like writing “MP”&IdNo .

H I t d tHere I wanted to concatenate MP and 

FALSEID

Concatenated Result