Developed using ArcGIS 9.2 .NET. Testing with ArcMap 9.2 and ArcMap 9.3.1
I have a custom Geoprocessing tool written in C# and wish to deploy to a machine which will call the Geoprocessing tool via a ESRI.ArcGIS.Geoprocessor.Geoprocessor object.
I have the following pieces:
Main dll: implements IGPFunction and IGPFunctionFactory (compiled C#)
Tool tbx: created with IGPUtilities2.CreateToolboxFromFactory
Tool dll: implements IGPProcess created using VS2005 IDE tools from the tbx file
I have installed and tested the Main.dll IGPFunction/IGPFunctionFactory in ArcMap on the deployed machine and it functions as expected.
On the "deployed" machine, I am writing another "Using Tool" C# program that uses the Tool.dll (IGPProcess) to attempt to call the geoprocessing tool.
So on the deployed machine, I have the following situation:
Main.dll (IGPFunction/IGPFunctionFactory) installed and COM registered
Tool.dll (IGPProcess) available and being included in the References of the "Using Tool"
Tool.tbx available, but not apparently used during runtime.
I notice there are a variety of ways of using a geoprocessing tool. I am using the wrapper contained within Tool.dll to instantiate the tool object then assign input and outputs and finally call ESRI.ArcGIS.Geoprocessor.Geoprocessor objects Execute(gptool,null) method. I am not directly using a VarArray then call by string name method.
I have a lot of debug statements, including at the beginning of every public IGPFunction/IGPFunctionFactory method. It appears that that none of these methods are being called. The Execute function "succeeds" without any messages from the gp object, without a return object (null), and without an exception.
I am also using an GPEventProcessor, but don't think this is causing any kind of problem. It seems to do what I think it should do.
Questions:
1) How exactly does the IGPFunction get called from the IGPProcess object (or more precisely, the Geoprocessor object using only the IGPProcess object?
I am guessing the IGPProcess uses the Toolbox Name and the Tool Name to look up the CSLID in the registry, which then points to another CSLID registry entry to find the currently-registered Main.dll. Is this close to true?
2) is the deployment of a tbx file and a IGPProcess dll dependent on preserving exact paths. Or is the Main.dll at "arms length" through the registry (i.e. as postulated above)?
3) What are the necessary pieces and steps for deployment for making the custom geoprocessing tool developed on one machine ("development machine") to be available to another developer on another machine ("deployed" machine) ?
4) Ultimately, I will need the steps for deploying this "Using Tool" program, along with the custom GP tool, to a non-development machine. Perhaps that will be a future posted question.