Wednesday, October 17, 2012


Find duplicate field values in ArcGIS using VB & Python script code


1)    Create new field “Short Integer” type to your attribute table (Example= “Duplicate”


2)    Open the field calculator for the newly created field

3)    Select VB script Parser for VB code and Python Parser for Python code.

4)    Check “show codeblock” option, while checking “show codeblock” box a new text box open at below i.e. to assign output variables.

5)    Paste the following code into the “Pre-Logic VBA Script Code” text box

VB Script

Static a As Object
Static i As Long
Dim pDuplicate As Integer
Dim pField

pField = [Test] 
***(you can choose your field)
If (i = 0) Then 
Set a = CreateObject ("Scripting.Dictionary") 
End If 
If (a.Exists(CStr(sField))) Then 
pDuplicate = 1 
Else 
a.Add CStr(sField), 1 
pDuplicate = 0 
End If 
i = i + 1
 


 And in the box at the bottom, insert….
pDuplicate



Python Script

uniqueList = [] 
def isDuplicate(inValue): 
  if inValue in uniqueList: 
    return 1 
  else: 
    uniqueList.append(inValue) 
    return 0


And in the box at the bottom, insert
 isDuplicate( !your field name! )



Monday, May 28, 2012


Loading Microsoft Bing Imagery and Road Network into ArcGIS 10


This tutorial will explain how to load Microsoft online Bing imagery and Road Network into ArcGIS 10.
ESRI manages a series of ready-to-use basemap layers that you can add directly to your map for free.

They are called ArcGIS Online basemaps and they’ve been available since version 9.3.1.  At version 10, however, you can access them directly with no need to register or download links.

The basemaps include aerial imagery used by Bing Maps, Street Map data, USGS topo maps, relief maps, and more.

Instead of having your data floating on white background, you can add basemap layers and create the professional and interesting maps with saving lot of time
With version 10 you can directly add basemap without registering or any alternates download links.

1)    Start ArcGIS,

2)    Go to File menu bar, select Add Data, Select Add Basemap.



3)    Or directly from Add Data Button which include a dropdown menu with the option to Add Basemap



4)    Add Basemap window will show the Basemaps types.


5)    Out of that we will choose Bing Imagery.

6)    It will be added in TOC (Table of content) as like the layers



7)    The map of the world appears with Bing data loaded, you can pan, zoom this database

8)    Now you can use these for plotting, adding geo-referencing features, for adjusting scanned maps, and many other numerous productions.


There are a few things to be aware of when using the ArcGIS Online basemaps.
·         You must have internet connection in order to access online basemaps.
·         You cannot download the data and save it on your system.
·         The basemaps are free to use for internal non-commercial uses; commercial use requires a license you can purchase from ESRI directly.

v  If you are using ArcGIS 9.3.1, you need to get a free bing Maps license from ESRI for more info click here


Tuesday, April 24, 2012


Export Map with location & attribute information in PDF using ArcGIS 9.3 or Later

This tutorial will explain how to export ArcGIS Map with Location and Attribute information Portable Document Format (PDF).
PDF can contain layers so users can control the visibility of in Adobe Acrobat or Reader 6.0 or later.
So in addition to layers, the PDF can contain feature information from ArcMap Attribute Table that users can identify using the Object Data tool in Adobe Acrobat Reader and Adobe Acrobat
Export Map as PDF

1)      Click on File, then select Export Map
 2)      Select Save as type “PDF”
 3)      Click on Advanced tab
4)      Click on check box mentioning Export Map Georefrence Information
 
5)      If you want to Export Layers as well as theirs feature attributes then select the Export PDF Layers and Feature Attributes.
 
 Layers in ADOBE READER:
1)      Open Adobe Reader
2)      Click LAYERS tab on the left:
3)      Select or deselect EYE symbol to turn layers on and off.
  

4)      To see the attributes of features click on Model Tree Tab
5)      To see the Location information.
Click on Tools from menu bar select Analysis and select Geospatial Location Tool to see the Location Information.
if you are not able to find Advance tab under Map export window,
then might be you need to add Map Export Patch in ArcGIS 9.3.
To get this Export Map Patch click here.

Exporting ArcGIS Labels to AutoCAD Text

To exporting Labels you need a Geodatabase
1)    Right click on Layer from the Table of Content.
2)   Add Your layer in to the Map
3)   Select Label feature to make label visible in Map view.
4)   Right click again on layer from the table of content.

5)   Select Convert Labels to Annotation
6)   Convert Labels to Annotation window will open.
7)   For storing Annotation, Select store in Data base.
8)   Select the type for which feature you want to create annotation.
9)   And select the destination (select your database path, where annotation feature will be stored)
10) At the last before converting make sure you have click on the box of Convert unplaced labels to unplaced annotation.(this will help you to get each labels from Dense area)
11)  Then last click on Convert.
Now another main task
Open the ArcCatalog
1)    Go to the path where you have stored your Annotation features.
2)   Right click on annotation feature class and select export and then to cad…
3)   Select Export to CAD window will open select Output type and then select Output destination
4)   Click OK.
Now you can open the exported CAD features in AutoCAD.
Enjoy!!!!!!!!………

Connecting to an Excel Table for use in ArcCatalog and ArcMap (read only access) for pre-9.2

To connect to an Excel table so you can use it in ArcCatalog and ArcMap, follow these instructions:
  1. Close ArcCatalog before starting any of this.
  2. In your Excel table highlight the rows/columns you want in your table, including the field names. This is done so you can possibly have more than one table within an Excel document.
  3. From Worksheet Menu Bar, choose Insert > Name > Define. Give it a name.
  4. Click OK and Save your document.
  1. Open your system Control Panel and choose Administrative Tools > Data Sources (ODBC)
  2. On User DSN tab, click Add…
  3. Highlight Driver do Microsoft Excel Driver (*.xls) and click Finish.
  4. Fill in the Data Source Name with any name you wish. It doesn’t have to be the name of the xls file you are working with.
  5. Click Select Workbook…
  6. Browse and select your Excel document.
  7. In ODBC Microsoft Excel Setup window, click OK.
  8. In ODBC Data Source Administrator, click OK.
  9. Start ArcCatalog.
  10. In the catalog tree, click Database Connections.
  11. Double-click Add OLE DB Connection.
  12. Highlight Microsoft OLE DB Provider for ODBC Drivers. Click Next >>
  13. In Use data source name click the down arrow. You should find the name you set in step 8. Choose it.
  14. Click Test Connection to see if things are working OK.
  15. Click OK. A new entry under Database Connections should be listed by the name of OLE DB Connection.
  16. Open OLE DB Connection (or you may rename it first).
  17. There should be a table listed by the name you assigned in Step 3 above.