polyline_GetAzimuth 999999 : Error executing function

4519
7
Jump to solution
01-29-2013 03:01 PM
AbdielLopez
New Contributor II
I am graduate ESCI student, and my project involves a lot of ArcGIS use. My project is related to assessing coastal erosion rates and causes near the Arctic coastlines of Barrow, I am currently trying to figure out the azimuth of a plolyline. I think I know how, but when I run it in the field calculator, I get an error, called 999999 : Error executing function. I tried several other calculations from Easy calculate just to see if they will work, but it give me the same error. I am using ArcMap 10, and I downloaded the EC50 (easy calculate). Can anyone help me out with this, and direct me on how to solve this error ? thanks[ATTACH=CONFIG]21187[/ATTACH]
0 Kudos
1 Solution

Accepted Solutions
AbdielLopez
New Contributor II
Thank you very, let me try that.


Right, that version Easy Calculate 5.0 is not compatible with ArcGIS 10.0 - see this:

"EasyCalculate 5.0 was for a long time a very popular set of expressions for the Field Calculator. The expressions however were written in Visual Basic for Applications (VBA) which is not supported in ArcGIS 10."
http://www.ian-ko.com/free/EC10/EC10_intro.htm


Try this upgrade, although your function may not be in there:

EasyCalculate 10
http://www.ian-ko.com/free/EC10/EC10_main.htm

Notice the minimum requirements at the bottom of the page:
ArcGIS 10.0
Microsoft Visual Studio 2008 Express edition,  Microsoft Visual Studio full 2008 or 2010
ArcGIS SDK for the Microsoft .NET Framework

EDIT:  By the way, you already have ArcGIS 10 and can install the free ArcGIS .NET SDK, and if you didn't know, you can get the Express version of Visual Studio free as well:

Microsoft Visual Studio 2008 Express Edition
http://www.microsoft.com/en-us/download/details.aspx?id=6506

View solution in original post

0 Kudos
7 Replies
T__WayneWhitley
Frequent Contributor
Do you see from your Results window the line where it states something like 'Executing: ' and then there's some VB code?
Probably there is a minor error in the code because it may be out-of-date -- you should paste that code you loaded into your field calculator (or attach the cal file it comes from).  It's otherwise difficult to read in your screen shot...

Can't remember if you need other components installed...for example, if you load code into VBA, you need a separate license and the ArcObjects library I think...the code you're entering may only need to be compliant with VBScript, but don't quote me on that.

Post the code if you can - that will be at least be the next lead to follow.
0 Kudos
T__WayneWhitley
Frequent Contributor
Right, that version Easy Calculate 5.0 is not compatible with ArcGIS 10.0 - see this:

"EasyCalculate 5.0 was for a long time a very popular set of expressions for the Field Calculator. The expressions however were written in Visual Basic for Applications (VBA) which is not supported in ArcGIS 10."
http://www.ian-ko.com/free/EC10/EC10_intro.htm


Try this upgrade, although your function may not be in there:

EasyCalculate 10
http://www.ian-ko.com/free/EC10/EC10_main.htm

Notice the minimum requirements at the bottom of the page:
ArcGIS 10.0
Microsoft Visual Studio 2008 Express edition,  Microsoft Visual Studio full 2008 or 2010
ArcGIS SDK for the Microsoft .NET Framework

EDIT:  By the way, you already have ArcGIS 10 and can install the free ArcGIS .NET SDK, and if you didn't know, you can get the Express version of Visual Studio free as well:

Microsoft Visual Studio 2008 Express Edition
http://www.microsoft.com/en-us/download/details.aspx?id=6506
0 Kudos
AbdielLopez
New Contributor II
Thank you very, let me try that.


Right, that version Easy Calculate 5.0 is not compatible with ArcGIS 10.0 - see this:

"EasyCalculate 5.0 was for a long time a very popular set of expressions for the Field Calculator. The expressions however were written in Visual Basic for Applications (VBA) which is not supported in ArcGIS 10."
http://www.ian-ko.com/free/EC10/EC10_intro.htm


Try this upgrade, although your function may not be in there:

EasyCalculate 10
http://www.ian-ko.com/free/EC10/EC10_main.htm

Notice the minimum requirements at the bottom of the page:
ArcGIS 10.0
Microsoft Visual Studio 2008 Express edition,  Microsoft Visual Studio full 2008 or 2010
ArcGIS SDK for the Microsoft .NET Framework

EDIT:  By the way, you already have ArcGIS 10 and can install the free ArcGIS .NET SDK, and if you didn't know, you can get the Express version of Visual Studio free as well:

Microsoft Visual Studio 2008 Express Edition
http://www.microsoft.com/en-us/download/details.aspx?id=6506
0 Kudos
AbdielLopez
New Contributor II
Hi again,

It worked, I was able to calculate azimuth with EC 10. Thank you for your help.
0 Kudos
T__WayneWhitley
Frequent Contributor
Beautiful, Abdiel, glad that worked - I know there are excellent functions in there I have used before.  Actually have not used Ianko's tools in quite some time, so that's good news there's a version compatible with ArcGIS 10.0 and I suppose 10.1 as well.  Interesting, were you able to install Studio 2008 Express and if so, how do you like it, the 'feel' of that software?

If you will, please mark my post #2 as the answer!  (think you marked the wrong one)

Thank you and enjoy!

-Wayne
0 Kudos
MiikaMäkelä1
New Contributor
Hi all,

I'm well aware of this Easy calculate tool to get azimuth for polylines. It works brilliant. However, I would like to challenge someone to make this in to a python script or something similar, so it could be used as a tool that could be built in to models. I currently have a very long model that I have had to split in to two parts, because I need to calculate azimuth in the middle of the process. Having this built in to the model would save quite a bit of effort.

Thanks for any ideas.
0 Kudos
T__WayneWhitley
Frequent Contributor
Not sure if anything is already written on this, but if you're familiar with geometry methods, you could get at the 'line parts' which would be a point array (for lines that are not true curves) and use that to mimic the azimuth calculation by using a trigonometry calculation on the 1st 2 point coordinates in the array.

This should work fine for straight lines, and this is what this applies to, correct?  I am asking because for lines with multiple vertices not falling along a straight line, this would make no sense.  I'm not sure, but I have also worked with MBG (minimum bounding geometry) standard tools in the Toolbox, but think there is an added field calculated for you that could be used?  You may have to perform some additional calculations, but that would save you from the details of accessing the geometry yourself.

EDIT:  Can use the 'envelope' option, adding the MBG_Width and MBG_Length fields, from which you may derive inverse tangent to get the angle...only thing is you will have to track quadrant (+x,+y; -x,+y; -x,-y; +x,-y), i.e. direction by virtue of 'where' end coords plot relative to begin coords.

Enjoy,
Wayne
0 Kudos