Removes a linear referencing system (LRS) entity from an input geodatabase workspace.
This tool performs a cascade delete of LRS entities to prevent any orphaned LRS Networks, LRS events, or LRS intersections. This means that removing an LRS will also unregister all LRS Networks that belong to that LRS, as well as all LRS events and LRS intersections that belong to any of those LRS Networks. Removing an LRS Network will likewise unregister all LRS events and LRS intersections that belong to that LRS Network.
The input workspace must contain an ArcGIS Pipeline Referencing LRS.
This tool does not delete any feature classes, fields, or data. It updates internal metadata tables that store information about the LRS entities within the input geodatabase workspace.
Removing an LRS Line Network that has an LRS Derived Network registered will also remove the LRS Derived Network.
Removing an LRS event or LRS intersection will only unregister the selected LRS event or LRS intersection; it will not impact the parent LRS Network.
A list of the LRS entities that were removed is provided upon the successful completion of this tool.
The output of this tool is a modified geodatabase workspace.
RemoveLRSEntity_locref (in_workspace, lrs_entity_type, lrs_entity_name)
The input geodatabase workspace that contains the LRS entity that will be removed.
The type of LRS entity that will be removed from the input geodatabase workspace.
The name of the LRS entity that will be removed from the input geodatabase workspace. The underlying feature classes and tables of the LRS entity will not be deleted.
The following script demonstrates how to use the RemoveLRSEntity tool in a python window.
# This will unregister an LRS Line Network as well as the dependent LRS Derived Network and all LRS Events # tool variables in_workspace = r"C:\UPDM_Data\LRS.gdb" lrs_entity_type = "NETWORK" lrs_entity_name = "EngineeringNetwork" # set current workspace arcpy.env.workspace = "C:\UPDM_Data\LRS.gdb" # execute the tool arcpy.RemoveLRSEntity_locref(in_workspace, lrs_entity_type, lrs_entity_name)
The following script demonstrates how to use the RemoveLRSEntity tool in a stand-alone Python script.
# Name: RemoveLRSEntity.py # Description: Example for unregistering an LRS entity from a Geodatabase workspace. # Requires: ArcGIS Pipeline Referencing # Import arcpy module import arcpy # Check out any necessary licenses arcpy.CheckOutExtension("LocationReferencing") # Local variables: Input_GDB = r"C:\UPDM_Data\LRS.gdb" Entity_Type = "NETWORK" Entity_Name = "EngineeringNetwork" arcpy.RemoveLRSEntity_locref(Input_GDB, Entity_Type, Entity_Name)
- ArcGIS Desktop Basic: Requires ArcGIS Pipeline Referencing
- ArcGIS Desktop Standard: Requires ArcGIS Pipeline Referencing
- ArcGIS Desktop Advanced: Requires ArcGIS Pipeline Referencing