What kind of data type for 'input features' in tools?

1799
2
05-10-2012 02:17 PM
New Contributor
Hello,

I have a difficulty with ArcObject .net.

PointsToLine P2Line = new PointsToLine();

P2Line.Input_Features = something; 




I tried to make a line from two points. So I created P2Line for that, but I failed to input a list of point features.

I tried Array of strings which are name of layers, and Array of FeatureClasses, and List of Layer names and FeatureClasses, but all of them failed.


How can I input list of point features properly?

I'm completely new on ArcObject. I'm just researcher who try to use it, not developer. So it would be appreciate to explain easily as possible.


Thanks!
Reply
0 Kudos
2 Replies
Occasional Contributor
Hello,

The Input Features parameter (or property of the PointsToLine class) takes a string value representing a featureclass or shapefile on disc,
e.g. @"C:\MyShapefiles\myPoints.shp" or @"C:\MyGeodatabases\myGeodatabase.gdb\myPointsFC

You should be able to also specify an object (ArcObjects), like objects of type IFeatureLayer, IDataset, IFeatureClass.  I am not sure if you can specify a geometry bag (IGeometryBag type object) or geometry collection (IGeometryCollection type object) or feature cursor (IFeatureCursor type object) but it may be possible.  If you get an exception upon specifying all of those, one at a time, of course, then that may not be possible.

Using ArcObjects as tool input
http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Using_ArcObjects_as_too...
Reply
0 Kudos
New Contributor
Thanks.

Then how do I input multiple shape files?

For example, if I want to intersect with two features, base.shp and area.shp ?

Hello,

The Input Features parameter (or property of the PointsToLine class) takes a string value representing a featureclass or shapefile on disc,
e.g. @"C:\MyShapefiles\myPoints.shp" or @"C:\MyGeodatabases\myGeodatabase.gdb\myPointsFC

You should be able to also specify an object (ArcObjects), like objects of type IFeatureLayer, IDataset, IFeatureClass.  I am not sure if you can specify a geometry bag (IGeometryBag type object) or geometry collection (IGeometryCollection type object) or feature cursor (IFeatureCursor type object) but it may be possible.  If you get an exception upon specifying all of those, one at a time, of course, then that may not be possible.

Using ArcObjects as tool input
http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Using_ArcObjects_as_too...
Reply
0 Kudos