ArcGIS 10 and Delphi

2730
7
05-07-2010 08:58 AM
GagagDa_Morvi
New Contributor
Hi All,

I have problems with programming ArcObjects  in ArcGIS10 with Delphi  7(using COM). Essentially, what happens is that the Type Library  (invoked from View->Type Library) fails to list any of the  ESRI  libraries (except two, which are not useful to me). as a result, my  existing code cannot be compiled or built. I have installed ArcGIS 10  PreRelease on Windows 7 Ultimate 64bit, installed the Developer Kit  (.NET) and VBA. I used Microsoft OLE Viewer to verify this, and it  correctly lists all the ESRi type libraries (.OLB). Also, I was able to  compile ESRI's Custom Tree Feature sample in VS2008 which uses COM  interaces and references these libraries). This means that this problem  is only for Delphi 7.

Any idea what could be wrong here? how can I reference these ESRI type  libraries in Delphi if they are not listed in the Type Library? I have  re registered all the OLB, but that hasn't helped. I know there are some  good experienced Delphi programmers lurking here - can you guys please  help me out with this problem?

Thank you,

Gagag
Reply
0 Kudos
7 Replies
GagagDa_Morvi
New Contributor
Hi All,

I have problems with programming ArcObjects  in ArcGIS10 with Delphi  7(using COM). Essentially, what happens is that the Type Library  (invoked from View->Type Library) fails to list any of the  ESRI  libraries (except two, which are not useful to me). as a result, my  existing code cannot be compiled or built. I have installed ArcGIS 10  PreRelease on Windows 7 Ultimate 64bit, installed the Developer Kit  (.NET) and VBA. I used Microsoft OLE Viewer to verify this, and it  correctly lists all the ESRi type libraries (.OLB). Also, I was able to  compile ESRI's Custom Tree Feature sample in VS2008 which uses COM  interaces and references these libraries). This means that this problem  is only for Delphi 7.

Any idea what could be wrong here? how can I reference these ESRI type  libraries in Delphi if they are not listed in the Type Library? I have  re registered all the OLB, but that hasn't helped. I know there are some  good experienced Delphi programmers lurking here - can you guys please  help me out with this problem?

Thank you,

Gagag

Well, anyone? Has anyone successfully used Delphi to code against ArcGIS 10 ArcObjects?

Thanks!

Gagag
Reply
0 Kudos
AndryJoos
New Contributor III
Hi Gagag

We have a whole bunch of custom modules (extensions, commands, dockable windows, .. basically everything you can do with ArcObjects) that are developed in Delphi. We compile them using the most recent ArcObject 10 Pre-Final type libs (and we did so for the Beta 1 and Beta 2, too). We haven't had any problems with that so far. We never had, actually. The significant difference I can see now, is that you're using the "oldschool" Delphi 7 release. We're working using Delphi 2010 (and previously, with 9.4 Beta 1 Delphi 2006). I'd suggest you try updating your Delphi development environment and see if you still happen to have the same problems.

Greetings,
Andry
Reply
0 Kudos
LucStappaerts
New Contributor II
Hi all,

I have been programming ArcObjects in Delphi from Delphi version 7 up until 2010 at this moment. Never had any problem woth the esri type libraries. I'm still working with ArcMap 9.3.1 though, we don't have ArcMap 10 here yet.
I use vista ultimate 32 bit however, shortly going to windows 7 64-bit as well. I suspect the problem might be located there. If I run into the same problem, I 'll notify it here.

Andry, since you have been working in Delphi/ArcObject for quite some time, do you have any problems showing hints in Delphi forms that are shown in ArcMap ? I have also had the following problem : the hint shows itself and when it disappears, every now and then it leaves it shadow on the screen. After some time the screen is scattered with these shadows.
I had hoped that the new TBalloonHint (introduced since d2009) would solve the problem. But it is even worse, the hints only appear every now and then and don't disappear any more until eventually another hint shows.
Do you have ant experience on this issue ?

Greetings

Luc Stappaerts
Reply
0 Kudos
AnkeKeuren
New Contributor
Hi Gagag,

Did you ever solve this problem? I'm having the same problem in Delphi 2010. I thought it had something todo with the version number of the olbs in the registry. If I change the 'a.0' into '10.0' in the following key, then I can see the ArcMap Object Library in the uses list in Delphi.

[HKEY_CLASSES_ROOT\TypeLib\{AA603763-259A-11D3-9F4A-00C04F6BC621}\a.0\0\win32]
@="C:\\Program\\ArcGIS\\Desktop10.0\\com\\esriArcMap.olb"

But then I'm not able to check it, because I get a message that the OLB is not registered.

Any suggestion is welcome!

Anke
Reply
0 Kudos
DmitryiChernov
New Contributor
Hi Gagag,

Did you ever solve this problem? I'm having the same problem in Delphi 2010. I thought it had something todo with the version number of the olbs in the registry. If I change the 'a.0' into '10.0' in the following key, then I can see the ArcMap Object Library in the uses list in Delphi.

[HKEY_CLASSES_ROOT\TypeLib\{AA603763-259A-11D3-9F4A-00C04F6BC621}\a.0\0\win32]
@="C:\\Program\\ArcGIS\\Desktop10.0\\com\\esriArcMap.olb"

But then I'm not able to check it, because I get a message that the OLB is not registered.

Any suggestion is welcome!

Anke


Hi, ankeur.
We have the same problem with olb registration and delphi library list. The same bug with the a.0 version in registry.
Have you got any solution in this theme? We have "Crash system" of our brains to find out any solution!
Reply
0 Kudos
AlanTonkin
Occasional Contributor
Hi, ankeur.
We have the same problem with olb registration and delphi library list. The same bug with the a.0 version in registry.
Have you got any solution in this theme? We have "Crash system" of our brains to find out any solution!


Hi Dmitryi,

Did you ever manage to solve this issue? If you did, would you please post your solution.

Alan
Reply
0 Kudos
WilliamMattingly
New Contributor
the problem is that DELPHI does not like Type Libraries who use a.1 instead of 10.1 as outlined (or a.0 instead of 10.0).  You cant rename registry key to 10.1 as this blows COM Registration.  What you need to do is place a duplicate key so you have both a.1 and 10.1 and they are identical.  What I did was use regedit and EXPORT key a.1 to a .reg file.  Open .reg file with Wordpad and do a global replace of a.1 with 10.1 and save file.  Finally double click .reg file and windows will add registry entry.  Now you will have a a.1 and a 10.1 subkey for the selected library.  I did this only for a few libraries and all is fine.  I want to re-iterate that this is a bug in DELPHI and not with ESRI.
Reply
0 Kudos