Select to view content in your preferred language

Moving a Feature Class out of a Feature Dataset

1062
2
07-20-2010 10:14 AM
PaulBlessing
Emerging Contributor
I have a workflow where I need some feature classes in a feature dataset/geometric network temporarily, but later they no longer need to be part of the feature dataset.  I'm able to delete the geometric network using ArcObjects just fine, but is there a way to programmatically move the feature classes out of the feature dataset and just back into the workspace level?
0 Kudos
2 Replies
JamesMacKay
Deactivated User
Hi Paul,

Within a geodatabase, the AddDataset method of the IDatasetContainer interface can be used to move feature classes between feature datasets and the workspace level. Here's a bit more information:

http://resources.esri.com/help/9.3/arcgisdesktop/arcobjects/esrigeodatabase/IDatasetContainer.htm

Cheers,
James
0 Kudos
PaulBlessing
Emerging Contributor
James, that works perfectly, thanks.  I had found the IDatasetContainer#addDataset method before, but I was getting errors when using it.  Turns out it was my fault and after trying it again everything worked.
0 Kudos