FeatureToLine工具的in_features参数不能为内存图层,否则会报内存错误,正确的写法如下:

FeatureToLine ftrToLine = new FeatureToLine();
ftrToLine.in_features = cpj.TempWs.PathName + @"\OriginDataset\" + currentFc.Key;
ftrToLine.out_feature_class = cpj.TempWs.PathName + @"\"+datasetName+ @"\" + currentFc.Key + "_toline";

05-02 04:34