Available with Standard or Advanced license.
Adds a feature class to a topology.
The new feature class must be in the same feature dataset as the topology.
Adding a new feature class to a topology automatically makes the entire topology dirty, so when you finish adding feature classes, you will need to revalidate the topology. The new features may create errors where previously there were none depending on the topology rules associated with the feature class.
Feature classes can only be added to topologies with the same versioned status. For example, a versioned feature class can be added to a versioned topology, but a non-versioned feature class cannot be added to a versioned topology.
If the feature class you are adding is z-aware, you can rank the relative accuracy of the feature class by elevation by setting the z rank for the feature class.
When adding a feature class to a topology, you must specify the rank of the vertices in this feature class relative to those in other feature classes. When validation of the topology cracks and clusters feature vertices, vertices from feature classes assigned a higher rank will not be moved when snapping with vertices with lower-ranked feature classes. The highest rank is 1, and you can assign up to 50 different rank values.
AddFeatureClassToTopology_management (in_topology, in_featureclass, xy_rank, z_rank)
The topology to which the feature class will participate.
The feature class to add to the topology. The feature class must be in the same feature dataset as the topology.
The relative degree of positional accuracy associated with vertices of features in the feature class versus those in other feature classes participating in the topology. The feature class with the highest accuracy should get a higher rank (lower number, for example, 1) than a feature class which is known to be less accurate.
Feature classes that are z-aware have elevation values embedded in their geometry for each vertex. By setting a z rank, you can influence how vertices with accurate z-values are snapped or clustered with vertices that contain less accurate z measurements.
AddFeatureClassToTopology example stand-alone script
The following stand-alone script demonstrates how to use the AddFeatureClassToTopology function.
# Name: AddFeatureClassToTopology_Example.py # Description: Adds a feature class to participate in a topology # Import system modules import arcpy arcpy.AddFeatureClassToTopology_management(r"D:\Calgary\Trans.mdb\Streets\Street_Topo",r"D:\Calgary\Trans.mdb\Streets\StreetNetwork", 1, 0.1)
- ArcGIS for Desktop Basic: No
- ArcGIS for Desktop Standard: Yes
- ArcGIS for Desktop Advanced: Yes