Summary
Disables COGO on a line feature class and removes COGO fields and COGO-enabled labeling and symbology. COGO fields can be deleted.
Usage
Disables the following COGO fields on the selected line feature class: ArcLength, Direction, Distance, Radius, and Radius2. These fields can be deleted.
Removes COGO-related labeling and symbology from the line feature class.
If a line feature class is not COGO enabled, the Traverse tool will not store any entered dimensions.
Use the Enable COGO tool to enable COGO on a line feature class.
Syntax
arcpy.management.DisableCOGO(in_line_features)
Parameter | Explanation | Data Type |
in_line_features | The line feature class that will have COGO disabled. | Feature Layer |
Derived Output
Name | Explanation | Data Type |
updated_line_features | The COGO disabled dataset. | Table View |
Code sample
The following Python window script demonstrates how to use the DisableCOGO tool in immediate mode.
import arcpy
arcpy.env.workspace = r"E:\ArcGISXI\Mont\Montgomery.gdb"
arcpy.DisableCOGO_management("Landbase\Road_cl")
The following stand-alone script demonstrates how to check for and disable COGO on a line feature class.
import arcpy
#Variable to contain the path of the feature class that will have COGO disabled
lineFeatureClass = r"d:\test.gdb\myLineFC"
#Check to see if the feature class is already COGO enabled by using .isCOGOEnabled on a Describe
if arcpy.Describe(lineFeatureClass).isCOGOEnabled == True:
#If it returns True, run DisableCOGO_management and pass the feature class
arcpy.DisableCOGO_management(lineFeatureClass)
else:
print("{} is not COGO Enabled".format(lineFeatureClass))
Environments
Licensing information
- Basic: No
- Standard: Yes
- Advanced: Yes