Tuesday, August 25, 2009

ArcMap Field Calculations

Often in a feature class, you will have an attribute which stores the file name and path of a file that is linked to that feature. For example, you may have a photo, a video or a condition report (PDF) which contains additional information about the feature. You can then use the Hyperlinking functionality in ArcMap to view the files via your map.

If you are storing the file paths as full paths (as opposed to relative), you may encounter some problems if you want to move the location of the images, reports etc. You could manually go through and update the paths, or you can use these simple field calculations.

Change File Paths
FileField = [FILE_PATH]
OrigPath = "D:\Temp"
NewPath = "C:\temp"
output = Replace(
FileField , OrigPath, NewPath )

Remove File Path
FileField = [FILE_PATH]
iLength = Len (
FileField )
iLastInd = InStrRev (
FileField , "\" )
iDif =
iLength - iLastInd
output = Right ( FileField , iDif )

To use them:
  1. Open the table of the feature class in ArcMap
  2. Start an edit session
  3. Right click on the column header, and select Field Calculator
  4. Click the advanced check box
  5. Copy the script into the "Pre-Logic VBA Script Code" box
  6. Replace the FileField property to the field that contains the file path in your feature class (delete the [FILE_PATH] part, and double click the appropriate field in the Fields List of the calculator)
  7. If changing the file path, update the OrigPath and NewPath variables
  8. Type output into the bottom box
  9. Click ok
  10. Save your edits

Tuesday, August 11, 2009

Using ArcPad Training Course - Brisbane

Following on from the popularity of our Using ArcPad training courses in Adelaide, Darwin and Hobart, we have now scheduled one in Brisbane on the 8th of October. If you are interested in attending, please download the registration form from our website, and return it to us as soon as possible. Be quick - early bird discounts apply!

Course updates:
  • Adelaide - 19th August 2009
  • Course is fully booked. If you are interested in attending at a later date, please contact us and register your interest
  • Darwin - 1st September 2009
  • Early bird registrations close on the 12th August 2009 (register)
  • Hobart - 22nd September 2009
  • Early bird registrations close on the 19th August 2009 (register)
  • Brisbane - 8th October 2009
  • Early bird registrations close on the 11th September 2009 (register)

We have also had a considerable amount of interest in our ArcPad Application Builder training course. Stay tuned if you are interested, as we will look at scheduling one of these in the not too distant future. If you would like one in your area, then please let us know.

Wednesday, August 5, 2009

Hard Reset for Mobile Devices


Occasionally a hard reset is required to return your mobile device to its factory settings following field testing, program evaluations, etc.

Often the hard reset function is not listed in the User Guide for your device, and may be difficult to locate.

A useful reference for hard resetting mobile devices is the RTFM website, which lists a number of mobile devices including the popular HP IPAQ range of products.

Feel free to contact RIA with any further questions.
!!NOTE!! Performing a hard reset will erase all the data from your mobile device. Please make sure you have copied all the data/files you wish to keep to another secure location (e.g. desktop computer, memory card, USB thumb drive) before performing a hard reset.

Tuesday, August 4, 2009

Increasing the length of a text field in a File Geodatabase

I was recently working on a job where I needed to increase the length of a text field of a feature class in a File Geodatabase. Similarly to changing the type of a field, this was not as straightforward as you might think. The process I went through was:
  1. Create a temporary field to store the values of existing features
  2. Delete the original field
  3. Create a new field, with the increased length (using the same name as the original)
  4. Copy the values from the temp field into this new field
  5. Delete the temp field

So basically, a lot of work to make a very minor change. I ended up using Model Builder and writing a Python script to automate the process. Being the nice people that we are, we uploaded it to ArcScripts so anyone can download it.

If you are interested, you can download the script here.

Interested in finding out more about Model Builder? Stay tuned, RIA is currently in the process of developing an Introduction to Model Builder training course.