Select to view content in your preferred language

Custom extensions

7323
54
Jump to solution
10-23-2009 06:56 AM
by Anonymous User
Not applicable
Original User: 164549

None of my custom developed extensions are showing up under Customize->Extensions, yet all the ESRI extensions are there.  Is there some new development process or different setting needed to make them show up?
0 Kudos
54 Replies
by Anonymous User
Not applicable
Original User: rlwatson

It appears to me that when you run the ESRIRegAsm tool that it produces a file in the following directory:

C:\Program Files\Common Files\ArcGIS\Desktop9.4\Configuration\CATID

The name of the file is something like {GUID}_name.ecfg.  The file itself is really a zip file which contains a file named config.xml.  It appears that ArcMap is using this file to determine component categories versus that which is in the registry.

I did the following:

1) Used the VB6 sample which has a tool bar, extension, and zoom in and out commands and built the DLL and reg file needed on a 9.3.1 system
2) Tested the sample on 9.3.1; no problems
3) Tested the sample on 9.4 using ESRIRegAsm; it does not work
4) Went to the CATID directory, extracted the config.xml, manually repaired the XML, and put it back in the zip
5) Tested the sample, no problems

ESRI, why don't you provide a trivial tool which does this?
0 Kudos
by Anonymous User
Not applicable
Original User: vanesch

Although ESRI no longer provides technical support for VB6 development, you can still register VB6 component libraries with ArcGIS 9.4. The ESRIRegAsm utility supports aâ??currently undocumentedâ??command line option (/l) to generate the clsid to categoryID mappings. One or more pairs may be listed.

esriRegAsm.exe /l <clsid><catid>[<clsid><catid>â?¦]

The example below registers project1.dll and produces a configuration file (.ecfg) containing two mappings: a command in the ArcMap commands component category, and an extension in the ArcMap extension component category:

c:\Program Files\Common Files\ArcGIS\bin>esriregasm c:\example\project1.dll /v 9.4 /p desktop /l {64C75217-013A-4739-9666-C8DFE10796C1}{B56A7C45-83D4-11D2-A2E9-080009B6F22B}{2d257f20-7dc5-4421-950c-2ffd661de1e9}{B56A7C42-83D4-11D2-A2E9-080009B6F22B}

You can obtain the category GUIDs using the ESRI provided category manager (categories.exe in the bin folder).

Note that you can execute esriRegAsm from your setup program, or you can continue to use self registration and have the setup copy the pre-generated configuration files to the appropriate well known folder.

Also note that ESRI no longer installs Microsoftâ??s VB6 runtime DLLs, and several VB6 runtime DLLs have been removed by Microsoft for security reasons.
0 Kudos
BillSmith
Regular Contributor
gottralf wrote:
.....
1. No, it is ESRI's policy that you must build your application for the release that you want to deploy to. In the past you did not need to do this, but unfortunately we do not provide support this type of workflow.
....

This really makes it hard for ESRI business partners to play nice with ESRI products.  Our software package is at least as big as ArcMap and has had an extension to communicate between the two for years to do 3D extraction.  Now we are supposed to build different versions depending on what version of Arc the end user is running.  I can tell you now that this will not happen.  We will have to decide whether to tell our users to stick with pre-9.4 or force them to upgrade.  Neither is an attractive option.
0 Kudos
by Anonymous User
Not applicable
Original User: natalie.pieper

@ vanesch, gottralf: could you please talk to each other and tell us what is the truth? Sorry, perhaps I do not understand it right, but I think your both information are inconsistent with another?

gottralf wrote: "We will not be supporting the installation or usage any VB6 extensions or applications."

vanesch wrote: "Although ESRI no longer provides technical support for VB6 development,  you can still register VB6 component libraries with ArcGIS 9.4. The ESRIRegAsm utility supports a�??currently undocumented�??command line option (/l) to generate the clsid to categoryID mappings."

I tested your sample with that command line option (/l) immediately with a vb6 dll, but I only got the message "Registration failed" and do not know why.

Before I spend more time in trying, please tell me:

Is it possible to registrate vb6 extensions with esriregasm.exe or is it not?

Regards
Natalie
0 Kudos
RalfGottschalk
Esri Contributor
@erik_nyberg:
The supported workflow would be to create a new dll for 9.4. 

@ rlwatson:
We do not provide a tool to register a VB6 component because we do not support the use of VB6 at 9.4.  If you figure out a way to do this there is nothing stopping you from registering your VB6 extensions with 9.4.  However, we will not provide Technical Support or log any bugs for any problems that you encounter with this workflow.

@nemesisity
I understand that this is not an ideal option for developers, however, we have always not supported this kind of workflow.  Things do change from release to release and it would not be possible for us to officially support a component that spans multiple versions.  This does not mean that it cannot be done, but we cannot guarantee that it will work, and we will not provide support or log/fix bugs for issues encountered with this workflow. 
  
@natalie.pieper
Vanesch and I are essentially saying the same thing.  We are both saying that ESRI will not provide support for VB6 at 9.4.  Registering a VB6 dll may be possible for you to do in certain scenarios, but we will not document, provide technical support, or guarantee that this will work all the time.  If you have figured out a way for it to work then you can do so at your own risk.

I hope this helps and clears up some of the confusion.  I understand that this may be frustrating to you, but our support policy has not changed.  (Aside from deprecating support for VB6)
0 Kudos
by Anonymous User
Not applicable
Original User: rlwatson

ESRIRegAsm does not seem like a good tool for registering assemblies during installation.

The behavior seems to be that it creates a process and returns immediately.

It would seem more reasonable that the utility would block until the registration is complete and return an exit code indicating whether or not the registration was successful.

Try to run this tool on a couple of hundred DLLs and see what happens.  It is not pretty!
0 Kudos
SteveVan_Esch
Esri Contributor
Can you post exactly how you are using the utility.

Thanks,
Steve
0 Kudos
by Anonymous User
Not applicable
Original User: rlwatson

I considered calling it on a large number of assemblies as part of the installer process.  In order to simulate that I simply wrote DOS script which uses a for loop that iterates over all the assemblies in a directory and calls ESRIRegAsm on each of them.  What I saw was that it created a massive number of processes which quickly consumed the system.  Apologies, if I have all of this wrong but I cannot see how the utility can be used in this context.

I think that the tool could be improved by:

1) Making it synchronous when run in silent mode
2) Changing it to return an exit code which indicates whether or not it was successful
0 Kudos
AndryJoos
Regular Contributor
It appears to me that when you run the ESRIRegAsm tool that it produces a file in the following directory:

C:\Program Files\Common Files\ArcGIS\Desktop9.4\Configuration\CATID

The name of the file is something like {GUID}_name.ecfg.  The file itself is really a zip file which contains a file named config.xml.  It appears that ArcMap is using this file to determine component categories versus that which is in the registry.


We have developed a small function that can write these files in our custom registration mechanism. Now I have a few questions, that I'm sure someone at ESRI can answer:
* Any special requirements for the XML, the filename of the XML (needs to be config.xml?) Where's the XSD? Is it somewhere available?
* The {GUID}_name.ecfg doesn't seem to be enforced. Any requirements to this? Can I name the file 'test.ecfg' and it works aswell?

From what I observe by now, neither 100% proper XML nor the filename format is enforced. I would like to hear how ESRI does handle this. I wouldn't want to rewrite the mechanism again and again for every new version, so some kind of specifications for the /CATID/ directory and it's contents would be highly appreciated.

Thanks & Greetings from Switzerland,
Andry
0 Kudos
by Anonymous User
Not applicable
Original User: vanesch

When launching ESRIRegAsm on a large number of assemblies--say from the command line--instances of the utility do not run synchronously (the second starts before the first finishes, etc.)

Like Microsoft�??s RegSvr32.exe, ESRIRegAsm is a standard Windows application and will not display a console window, and will not block the calling process when launched (only console applications block in such situations).  ESRIRegAsm will run synchronously if called from a bat file, and most installers (including Microsoft Installer) offer an option to wait for a utility launched during the install.  In most cases, it makes more sense to generate the configuration files ahead of time, and then simply copy these files to the appropriate destination folder as part of the setup (rather than running ESRIRegAsm at all on the target machine).  The ESRIRegAsm utility will return 0 on success.
0 Kudos