IFeatureLayer pFeLayer = axMapControl1.get_Layer(0) as IFeatureLayer; IDataLayer idata = pFeLayer as IDataLayer; IDatasetName idataname = idata.DataSourceName as IDatasetName; string path = idataname.WorkspaceName.PathName; Geoprocessor gp = new Geoprocessor(); gp.OverwriteOutput = true; gp.SetEnvironmentValue("workspace", path); CollectEvents collect = new CollectEvents(); collect.Input_Incident_Features = pFeLayer.FeatureClass; collect.Output_Weighted_Point_Feature_Class = @"E:\collect.shp"; collect.Z_Max_Value = 10; gp.Execute(collect, null)
我想用gp工具实现收集事件的功能,就是得到加权点在最后一句出错
尝试把输入输出放到一个里面出错,尝试把输入换成全路径出错,尝试把workspace的设置放到输入输出下面出错,license的属性里面也打了对勾还是出错,求高手帮助,这些代码就在一个工程里,帮我调试一下吧,已经纠结了好长时间了,求帮助帮助啊!!