Hello,
I try to make a new polygon with polygon and polyline, using Feature to Polygon tool.
fcBoundary is polygon IFeatureClass, and fcPairline is polyline IFeatureClass.
Below code does not work.
I got just COM error without any specification...
similar code worked well in other console application, but when I tried to migrate console application to ArcMap Add-in, there are so many codes that make errors..
I try to make a new polygon with polygon and polyline, using Feature to Polygon tool.
fcBoundary is polygon IFeatureClass, and fcPairline is polyline IFeatureClass.
Below code does not work.
Code:
IGpValueTableObject vt = new GpValueTableObjectClass();
vt.SetColumns(2);
object weight;
weight = 1 as object;
object obj1 = fcBoundary; //IFeatureClass fcBoundary
vt.AddRow(ref obj1);
vt.SetValue(0, 1, ref weight);
object obj2 = fcPairLine; //IFeatureClass fcPairline
vt.AddRow(ref obj2);
vt.SetValue(1, 1, ref weight);
parameters = new VarArrayClass();
MessageBox.Show(fcDict["fcBoundary"]);
parameters.Add(vt);
parameters.Add("pM_"+i.getOri+"_"+i.getDes);
result = gp.Execute("FeatureToPolygon_management", parameters, null);
I got just COM error without any specification...
similar code worked well in other console application, but when I tried to migrate console application to ArcMap Add-in, there are so many codes that make errors..