Select to view content in your preferred language

ArcGIS 10 Field Calculate Tool doesn't work anymore

731
2
03-14-2011 10:38 AM
JimDahl
Regular Contributor
I upgraded from 9.3 to 10 and found out the calculations for area all have to be redone.  The following only works for me when I do not have any if statements - !shape.area@acres! - and if I add /43560 to the end.  Can any one help me with this CODE BLOCK that worked in 9.3?

if ([FID_ROW_WA] > -1 AND [FID_row_po] = -1) OR ([FID_ROW_WA] >-1 AND [FID_HYD_WA]>-1 AND [FID_row_po]>-1 AND [FID_cad_pa]>-1) then
 
Dim dblArea as double
Dim pArea as IArea
Set pArea = [shape]
dblArea = pArea.area

endif

The expression to calc is dblArea/43560.

thanks, Jim
0 Kudos
2 Replies
JoelShegrud
Deactivated User
I had a problem similar to this. I found that when I made the switch the environments were defaulted to geographic. So I just reset my environments to the projected coordinate system and the calculations were fixed.
0 Kudos
JimDahl
Regular Contributor
I right clicked on the tool in model builder and then properties and defined the projection output, but still doesn't work.  I really must be missing something.  Either all other users are better programmers than I am or they don't use a calculate tool.

Thanks for your input. The Chat Support from ESRI wasn't any help other than said I had to change the expression.  I figured that out. I suppose I need to know how to change the VBA to VB.

Jim
0 Kudos