Line featureclass to network dataset

Discussion created by iaminsu12 on May 14, 2014
Latest reply on May 16, 2014 by Hornbydd

I have questions regarding to network analysis.

I'm using C# .Net.

What I gonna to do is

1) Produce line featureclass from some prior steps

2) Convert line featureclass to network dataset

3) Generate OD matrix

Step 1 is done. But I don't know how to copy a featureclass to featuredataset, which is required for network dataset.

I searched web, but there are only 'suggestions' like about using IDataset.adddata without any sample code.

Also, I tried to designate feature dataset as an output location of geogprocessing, but failed. If there is a way to designate feature dataset as output location of geogprocessing, it will be also fine. For example, code on the bellow is convert layer (polygon featureclass) to line featureclass. Is there any way to make output on the featuredataset at the same workspace?? I tried but failed.

fc2Line.in_features = layer;
fc2Line.out_feature_class = "grid_Line";
gp.Execute(fc2Line, null);

Thank you.