modybsystematics-co-il-esridist

Runnung Script tools from C#

Discussion created by modybsystematics-co-il-esridist Employee on Sep 11, 2012
Latest reply on Sep 12, 2012 by kenbuja
Hi All

We are trying to run system tools that are really a python scripts from Desktop 10.1 and get an error about wrong paramaters.
We are trying two methods:

IGeoProcessor pgp = new GeoProcessor();
IVariantArray parameter = new VarArrayClass();
parameter.Add(@"c:\temp\ForRT.gdb\people");
parameter.Add(@"c:\temp\ForRT.gdb\people_point_line");
pgp.Execute("PointsToLine_management", parameter , null);

or:

Geoprocessor GP = new Geoprocessor();
PointsToLine pointsToLine = new PointsToLine();
pointsToLine.Input_Features = @"C:\temp\ForRT.gdb\people";
pointsToLine.Output_Feature_Class = @"C:\temp\ForRT.gdb\people_PointsToLine";
GP.Execute( pointsToLine, null);

Both ways gives the same error.

Can anybody help?
Thanks
Mody

Outcomes