Showing posts with label ArcView. Show all posts
Showing posts with label ArcView. Show all posts

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.