“System.Runtime.InteropServices.COMException”类型的未经处理的异常在 ESRI.ArcGIS.Geoprocessor.dll 中发生

一个GP工具的问题请教各位
“System.Runtime.InteropServices.COMException”类型的未经处理的异常在 ESRI.ArcGIS.Geoprocessor.dll 中发生
代码如下:
Geoprocessor gp = new Geoprocessor();
CreateFishnet fishnet = new CreateFishnet();
fishnet.out_feature_class = @"F:\临时文件\规划工具\data\fishnetDemo.shp";
fishnet.number_columns = 10;
fishnet.number_rows = 10;
fishnet.template = @"F:\临时文件\规划工具\data\ghsjp.shp";
fishnet.geometry_type = "POLYLINE";
gp.Execute(fishnet, null);
已邀请:

铭净止水

赞同来自:

现在是这样: 
Geoprocessor gp = new Geoprocessor();
            CreateFishnet fishnet = new CreateFishnet();
            fishnet.out_feature_class = @"F:\临时文件\规划工具\data\fishnetDemo.shp";
            IPoint point=new PointClass();
            point.X=117.0831856110001;
            point.Y=36.61260221400005;
            fishnet.origin_coord = point;
            point=new PointClass();
            point.X=117.0831856110001;
            point.Y=46.61260221400005;
            fishnet.y_axis_coord = point;
            fishnet.number_columns = 10;
            fishnet.number_rows = 10;
            
            fishnet.cell_height = 0;
            fishnet.cell_width = 0;
            //fishnet.template = @"F:\临时文件\规划工具\data\ghsjp.shp";
            fishnet.geometry_type = "POLYLINE";
            gp.Execute(fishnet, null);

朱新颖

赞同来自:

现在还是报错吗?ArcMap中使用该参数正常吗?

胖胖胖胖我要长胖

赞同来自:

请问您的问题解决了吗?

wsw771006

赞同来自:

我觉得路径应该写成@"F:\\临时文件\\规划工具\\data\\ghsjp.shp"

要回复问题请先登录注册