colawater.toolbox.append_to_art.tool#

Contains the functions used by the Append to ART tool tool and other helper functions.

Module Contents#

Functions#

execute(→ None)

Entry point for Append to ART.

parameters(→ list[arcpy.Parameter])

Returns the parameters for Append to ART.

append_to_art(→ list[tuple[Optional[str], Ellipsis]])

Appends recent integrated and well-sourced mains from a given editor to the

colawater.toolbox.append_to_art.tool.execute(parameters: list[arcpy.Parameter]) None#

Entry point for Append to ART.

Appends recent integrated and well-sourced mains from a given editor to the Asset Reference Table.

Parameters:

parameters (list[arcpy.Parameter]) – The list of parameters.

colawater.toolbox.append_to_art.tool.parameters() list[arcpy.Parameter]#

Returns the parameters for Append to ART.

Parameters are of type GPString, GPDate, GPFeatureLayer, GPTableView, and GPBoolean.

Returns:

The list of parameters.

Return type:

list[arcpy.Parameter]

colawater.toolbox.append_to_art.tool.append_to_art(wm_lyr: arcpy._mp.Layer, wm_where_clause: str, art_table: arcpy._mp.Table, ignore_nulls: bool) list[tuple[str | None, Ellipsis]]#

Appends recent integrated and well-sourced mains from a given editor to the Asset Reference Table.

Parameters:
  • wm_lyr (arcpy._mp.Layer) – A water main layer from which mains will be read.

  • wm_where_clause (str) – A SQL where clause used to select a subset of wm_lyr.

  • art_table (arcpy._mp.Table) – The asset reference table.

  • ignore_nulls (bool) – Whether to filter rows with None values. If false, ValueError will be raised if a row has a None value.

Returns:

A list of records of appended mains.

Return type:

list[tuple[Optional[str], …]]

Raises:

ExecuteError – An error ocurred in the tool execution.

Note

Modifies input table.