I used to run this length calc on my data in ArcGIS 8 and 9, and now it don't work in ArcGIS10. Can you tell me what I have done wrong?
Dim dbllength as double Dim pcurve as icurve Set Pcurve = [shape] Dbllength = Pcurve.Length Length = dbllength
do you mean inside the field calculator?
in this case I suggest you to use python because starting from 10.0 it's the "official" language supported in ArcGIS
10.0 is the last ArcGIS version that uses VBscript, staring from 10.1 it will be deprecated and unsupported
with Python in field calculator you have to use !Shape.length! or !Shape.area! (Python "!" replace VBScript "[")
Calculate Field with geometry in 10.x REQUIRES that you use Python. VBScript access to geometry is no longer supported.
Python is the recommended scripting language for ArcGIS. Use Python if you want access to geoprocessing functionality, including feature geometry.
Use VBScript if you have VBA or VBScript experience and are comfortable with the scripting syntax. Saved .cal files from previous versions of ArcGIS may work or require minimal modifications. If you have VBA (I think they mean VBScript) code from past releases that use ArcObjects, you will need to modify your calculations to work in 10.0.
I think the suggestion to use VBScript is bad advice... VBScript expressions cause the Calculate Field tool to fail in 64-bit environments (Background geoprocessing, ArcGIS Server, standalone python scripts running in 64bit).