+ Reply to Thread
Results 1 to 5 of 5

Thread: Add Custom GP Tool to Toolbox

  1. #1
    Mark Woolley
    Join Date
    Aug 2010
    Posts
    10
    Points
    0
    Answers Provided
    0


    0

    Default Add Custom GP Tool to Toolbox

    There is a thread over in the archived forums that got right to the edge of addressing my problem:
    http://forums.esri.com/thread.asp?t=274589&f=1170&c=93

    I'm working in an ArcGIS 9.3.1 environment.

    I have a Custom Geoprocessing Tool developed in VB.NET / Visual Studio 2005. It runs great in Desktop applications on the machine it was compiled on. I'm having trouble getting the map, toolbox, models and DLL containing the custom tool to all play nice on our ArcGIS Server. I've copyed the compiled DLL and related files to the server and registered the DLL using Regasm.exe. I do not have ArcGIS Desktop tools on the Server. Is there a special folder the custom tool needs to be placed in?

    When I run a very simple model that only contains the custom tool I get the error:
    000816 : The tool is not valid.

    The archived thread ended tantalizingly with Matt Rodriguez stating: "I made this work. I had to ask ESRI developers for help because there isn't really documentation on how to do this."

    Mark Woolley
    GIS Programmer/Analyst
    Ontario Government - LRC
    Last edited by mwoolley; 11-04-2010 at 12:13 PM.

  2. #2
    Mark Woolley
    Join Date
    Aug 2010
    Posts
    10
    Points
    0
    Answers Provided
    0


    0

    Default Re: Add Custom GP Tool to Toolbox

    Perhaps my problem comes down to this: How do I diagnose whether the problem is internal to the tool (the DLL's programming) or a problem with calling the tool (something to do with the toolbox/model/registry process).

    Since the tools works fine on the desktop and since the toolbox I've published to the server had the custom tool added before it went on the server (when the tool was added it would have used the local copy of the DLL) I suspect it's the latter. If so does anybody have a recipe for implementing custom tool DLLs on ArcGIS server and referencing them from a toolbox/model?

  3. #3
    Mark Woolley
    Join Date
    Aug 2010
    Posts
    10
    Points
    0
    Answers Provided
    0


    0

    Default Re: Add Custom GP Tool to Toolbox

    I learned that when registering the DLL on the SOC you need to include the /codebase switch of the regasm.exe utility. The DLL must also be registered on the workstation where you authoring the Toolboxes and Models so that it appears in the list of available tools when you are creating the Toolbox and using it in the models.

    The error "000816 : The tool is not valid" went away - seems that was about the registration problem. The new error from GPServerSync.GetReturnMessages is "Invalid return value: " which is probably internal code issues within the DLL that are ArcGIS Server specific (worked fine on Desktop) likely around gp.scratchworkspace.
    Last edited by mwoolley; 11-10-2010 at 04:46 AM.

  4. #4
    Robert Fortin
    Join Date
    Dec 2010
    Posts
    1
    Points
    0
    Answers Provided
    0


    0

    Default Re: Add Custom GP Tool to Toolbox

    Mark,

    I have a similar problem on Windows Server 2008 64-bit. What do mean exactly when you say "registering the DLL on the SOC"? I tried registering using the 32-bit version of regasm but still the same message. Could it be the user account it needs to be registered in?

    Thanks for your help!

    Robert

  5. #5
    Mark Woolley
    Join Date
    Aug 2010
    Posts
    10
    Points
    0
    Answers Provided
    0


    0

    Default Re: Add Custom GP Tool to Toolbox

    Quote Originally Posted by rfortin22 View Post
    Mark,

    I have a similar problem on Windows Server 2008 64-bit. What do mean exactly when you say "registering the DLL on the SOC"? I tried registering using the 32-bit version of regasm but still the same message. Could it be the user account it needs to be registered in?

    Thanks for your help!

    Robert
    "Registering the DLL" was meant to mean: use the regasm utility with it's /codebase switch to add an entry to the computers registry for the DLL. "On the SOC" was a way of referring to the computer(s) in question. If you have multiple computers configured to be SOCs in your ArcGIS Server environment you would have to (presumably as an administrator, in order the update the registry) execute the same regasm command on each machine.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts