Geoprocessing arcobjects Intersect

2456
2
Jump to solution
11-01-2015 11:02 PM
NigelDsouza
Occasional Contributor

Hi,

I have no idea as to how do I pass multiple input features to the intersect tool.

Here is my code

regards,

Nigel

Geoprocessor pGp = new Geoprocessor();

  IFeatureClass pGDMFclass = pGDMFLayer.FeatureClass;

 IFeatureClass pZoneFclass = pZoneFLayer.FeatureClass;



               Intersect pIntersect = new Intersect();
                    //Pass more than one feature  
              pIntersect.in_features = pZoneFclass;
  
                pIntersect.join_attributes = "ALL";
                pIntersect.output_type = "INPUT";
                IWorkspace pWs = pFWS as IWorkspace;


                string path = pWs.PathName + "\\" + "TEST";


                pIntersect.out_feature_class = path;
                pGp.OverwriteOutput = true;
                pGp.Execute(pIntersect, null);
Tags (1)
0 Kudos
1 Solution

Accepted Solutions
FreddieGibson
Occasional Contributor III

You can either put your feature classes into an array or pass a semi-colon delimited string into the parameter.

Update..did a quick search in the documentation and came across this page.

How to use multiple inputs

http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#/How_to_use_multiple_in...

View solution in original post

0 Kudos
2 Replies
FreddieGibson
Occasional Contributor III

You can either put your feature classes into an array or pass a semi-colon delimited string into the parameter.

Update..did a quick search in the documentation and came across this page.

How to use multiple inputs

http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#/How_to_use_multiple_in...

0 Kudos
NigelDsouza
Occasional Contributor

I have tried passing in an array but it still throws an exception. Could you write down the syntax please? I am doing the following. IFeatureClass [] inputfeturesArr = new IFeatureClass [2] inputfeturesArrp[0] = FClass1; inputfeturesArr[1] = FClass2; Regards, Nigel

0 Kudos