Title Abandon Rows
This tool sets up the structure for abandoning rows and creates the attribute rules necessary to migrate them to separate layers outside of the Utility Network. As a result, these rows will be excluded from the network's topology once moved.
Upon running this tool, new classes will be generated and will be created at the root level within the database containing your Utility Network. During configuration you select the classes associated with your utility network you would like to use for abandonment. It will create a copy of the classes with the designated prefix. For instance, if the prefix is set as 'ab' and the class selected is 'SewerDevice', the resulting class would be named 'ab_SewerDevice' and it would be located at the root level of your database. This is the class that will be used for storing abandoned rows.
This tool also creates two attribute rules. The first rule is applied to the selected class to facilitate the transfer of row to the newly created abandoned class. It is an immediate calculation rule that moves rows when the specified criteria in the abandon field and value section are met. Since this is an immediate calculation rule, the features are copied immediately once the criteria is met. For instance, if you want to move a feature to the abandoned layer when the field 'lifecyclestatus' equals 0, you will set 'lifecyclestatus' as the field and the value as 0. Whenever a row in that class has its 'lifecyclestatus' set to 0, the immediate calculation attribute rule will be triggered, and a copy of the row will be generated in the associated abandoned class. When multiple fields and values are specified, all criteria must be met for the attribute rule to trigger.
The second attribute rule created is applied to the newly created abandoned classes. This rule functions as a batch calculation rule, requiring manual triggering. Once activated, the rule evaluates the rows present in the abandoned class and, if they exist, removes them from the original source class. Until this rule is manually triggered, the row will persist in both the original class and the abandoned class. In order to manually trigger this rule, you will have to evaluate the rules either using the Error Inspector or the Evaluate Rules geoprocessing tool. More information can be found in the help on Evaluating Attribute Rules.
If you need to reverse the abandonment of a row, you can utilize the restore row capability on your original source dataset and delete the feature from the abandoned feature class. It's important to note that this method only works in a versioned environment. Alternatively, in an un-versioned environment, you can use the append tool to reintroduce the row from a historical backup or from the abandoned class, but this will introduce a new Object ID and may not allow you to maintain its Global ID.
License
Standard
AbandonRows (in_table, out_folder, prefixes, {where_clause})
Parameter | Explanation | Data Type |
---|---|---|
in_table |
Dialog Reference
The table or feature class that will have the new rule applied. |
DETable |
out_folder |
Dialog Reference
The folder where the output CSV will be saved. The name of the file is taken from in_table. |
DEFolder |
prefixes |
Dialog Reference
The prefix that will be added to the beginning of the newly created abandoned classes and their aliases. |
GPValueTable |
where_clause (Optional) |
Dialog Reference
SQL Expression to filter records. Only records that satisfy the query will be calculated. |
GPSQLExpression |
AbandonRows example 1 (Python window)
Creates the Abandon Layers and Attribute Rules
import arcpy
arcpy.udms.CreateAbandonClasses(
network=r"C:\Network.geodatabase\main.UtilityNetwork\main.Network",
un_classes="main.StructureJunction;main.StructureBoundary;main.StructureJunctionObject;main.StructureLine;main.StructureEdgeObject;main.ElectricDistributionDevice;main.ElectricDistributionAssembly;main.ElectricDistributionJunction;main.ElectricDistributionJunctionObject;main.ElectricDistributionLine;main.ElectricDistributionEdgeObject",
prefix="ABT",
abandon_values="lifecyclestatus 0;lifecyclestatus 1",
)
AbandonRows example 2 (stand-alone script)
Creates the Abandon Layers and Attribute Rules
import arcpy
un = r"C:\Network.geodatabase\main.UtilityNetwork\main.Network"
un_classes = [
"main.StructureJunction",
"main.StructureBoundary",
"main.StructureJunctionObject",
"main.StructureLine",
"main.StructureEdgeObject",
"main.ElectricDistributionDevice",
"main.ElectricDistributionAssembly",
"main.ElectricDistributionJunction",
"main.ElectricDistributionJunctionObject",
"main.ElectricDistributionLine",
"main.ElectricDistributionEdgeObject",
]
abandon_values = [
["lifecyclestatus", 0],
["lifecyclestatus", 1],
]
prefix = "ABT"
arcpy.udms.CreateAbandonClasses(network=un, un_classes=un_classes, prefix=prefix, abandon_values=abandon_values)