Remove Empty Feature Class From Geometric Network (Data Management)
Summary
Removes an empty feature class from a geometric network.
Usage
- 
Only empty feature classes can be removed; populated feature classes cannot be removed. Within an enterprise geodatabase, this may require the Compress tool to be run in order for the feature class to be recognized as empty.
 - 
This tool will not delete the feature class; it will only remove it from the network. You must delete the feature class if needed.
 - 
In an enterprise geodatabase, the feature class being removed and the geometric network may be versioned.
 - 
You cannot remove the orphan junction feature class from a geometric network.
 - 
A feature class cannot be removed from the geometric network if, besides the orphan junction feature class, it is the sole feature class in the network.
 
Syntax
| Parameter | Explanation | Data Type | 
in_geometric_network  | 
 The geometric network from which the feature class will be removed.  | Geometric Network | 
in_feature_class  | 
 The name of the feature class to remove.  | String | 
Code Sample
The following stand-alone Python script demonstrates how to use the RemoveFeatureClassFromGeometricNetwork tool to remove an empty feature class called "Tanks" from a geometric network.
# Import arcpy module
import arcpy
# Local variables:
Water_Net = "C:/GeometricNetworks/Montgomery.gdb/Water/Water_Net"
# Process: Remove Feature Class From Geometric Network
arcpy.RemoveEmptyFeatureClassFromGeometricNetwork_management(Water_Net, "Tanks")