29 October, 2007

ESRI 9.2 lacks info regarding VS 2005

ESRI seems to like to play things very close to the vest - so to speak. It is difficult to find information on just about anything dealing with creating class libraries in .NET to work with ArcGIS 9.2, even though they tout that 9.2 is built on the .NET Framework 2.0. So far, 99% of the articles, tutorials or help I have found have been for pre-9.2 and VS 2003 (Framework 1.1).

To be fair, I have found a few PDF files discussing 9.2 and .NET 2.0, but that is about it. They are actually PDFs made from PowerPoint slides that I'm certain were from some conference or demonstration given probably a year or so ago. But the walkthroughs they have on their site for VS 2003 - which seem exceptional in detail - are conspicuously missing for VS 2005. Everything I have found that deals with VS 2005 centers around the ArcGIS SDK which , of course, didn't get installed on my system along with ArcGIS 9.2, and is not downloadable from ESRI - which I find strange. It seems to me that other companies make their SDK readily available to developers, but ESRI doesn't seem to want to play that game for some reason.

So here I am, about a week into the project. I've got most of the VBA code translated, but I can't test any of it because I can't get the crap to work properly in ArcMap, and I can't find any decent assistance on the 'net. I guess I'm going to have to go be the quintessential n00b at the ESRI forums and beg for some sort of help. I hate doing that, but, like Duke Wayne said "A man's gotta do what a man's gotta do" ( or someone said that anyway ).

Here are the walkthrough/tutorials that I found pertaining to ESRI and .NET if anyone is interested/needs them:

The way I'm looking at this right now, It seems like it would be infinitely easier to create a desktop app and add the ArcMap to the app, instead of trying to create modules to run in ArcMap. But that isn't the way things are right now, so I've gotta do what they want done.




Technorati Tags: , , ,

17 October, 2007

Converting VBA code to .Net

My latest torture assignment is to convert legacy VBA code in ArcView applications to the .NET Framework. I haven't decided yet if I will convert them to VB .NET or C#, but since I like the C# language better, I will probably attempt to convert them to C#. But then, that somewhat depends on ArcView and how it handles these things. I haven't much (any) experience with ArcView so this is all new territory to me.

I did find a couple of somewhat useful links regarding converting VBA to .NET:

Converting Code from VBA to Visual Basic .NET

Convert VBA to VB .Net and C#

I found this VBA script which purports to export VBA modules, class modules and forms associated with an ArcView document to a separate folder. I haven't tried it yet as I won't get ArcView loaded until tomorrow. But I'm certainly going to give it a go. Anything to make things easier!

Export VBA Code

Okay, I don't know if the module will work at any rate because we can't compile the ArcView project here. I tapped another developer who actually has ArcView on her machine and we were going to run this module, but the guy who created this project has referenced some Autodesk stuff, which we don't have. So we have to export the modules,classes and forms one at a time. There are quite a few of them there.

I'll keep you posted on what entails with converting the VBA to C# code as this endeavor progresses.