サマリー
The UtilityNetwork class provides access to methods that support managing subnetwork controllers and associations between network features.
構文
UtilityNetwork (utilityNetworkPath)
パラメーター | 説明 | データ タイプ |
utilityNetworkPath | The input utility network. | String |
方法の概要
方法 | 説明 |
AddConnectivityAssociation (association_type, from_table, from_global_id, from_terminal_name, to_table, to_global_id, to_terminal_name, percent_along) | The AddConnectivityAssociation method creates a connectivity association between two noncoincident features to model connectivity. For example, you can define connectivity associations for point feature classes and junction object tables in the domain network as long as network rules exist to support the association. There are several types of connectivity associations: Junction-junction connectivity, Junction-edge from connectivity, Junction-edge midspan connectivity, and Junction-edge to connectivity. |
AddContainmentAssociation (container_table, container_global_id, content_table, content_global_id, is_content_visible) | The AddContainmentAssociation method creates a containment association to model a dense collection of features in a network. Containment associations allow a collection of features to be represented by a single feature. For example, devices, wires, and conductors can be placed inside features such as substations, switch gears, trenches, and ducts. Content features can be shown or hidden in the map view to improve visibility and reduce map clutter. Features that contain other features are known as containers and the features being contained are known as content. ユーティリティ ネットワークは、ネストされた格納や、格納物と格納器の間の 1 対多のリレーションシップをサポートしています。 ネストされた格納では、格納器フィーチャは別の格納器フィーチャを格納することができ、この別の格納器フィーチャがさらに格納物を格納します。 たとえば、変電所にジャンクション ボックスを入れ、そのジャンクション ボックスに電子機器を格納できます。 1 対多のリレーションシップでは、1 つの格納物フィーチャが複数の格納器に格納されます (たとえば、多くの集合ダクトに広がる 1 つの地下ライン)。 注意:1 つのポイント フィーチャを複数の格納器フィーチャ内の格納物として指定することはできません。 |
AddStructuralAttachmentAssociation (structure_table, structure_global_id, attachment_table, attachment_global_id) | The AddStructuralAttachmentAssociation method creates a structural attachment association to allow the modeling of supporting structures and attachments that convey resources in the network. Structural attachments logically associate structure features with other features in a utility network. These associations allow modeling the relationship between structures that support equipment and associated assets that are attached. For example, a pole can serve as the structure, with a transformer as the attachment. Learn more about how to create a structural attachment association |
DeleteConnectivityAssociation (association_type, association_global_id) | The DeleteConnectivityAssociation method removes the connectivity association between two features. |
DeleteContainmentAssociation (association_global_id) | The DeleteContainmentAssociation method removes the containment association between a container feature and its content. |
DeleteStructualAttachmentAssociation (association_global_id) | The DeleteStructualAttachmentAssociation method removes the structural attachment association between a structure feature and an attachment feature. Learn more about how to delete a structural attachment association |
DisableSubnetworkController (table, global_id, terminal_name) | The DisableSubnetworkController method removes the subnetwork controller assignment from a terminal on a device or junction object. |
EnableSubnetworkController (table, global_id, terminal_name, subnetwork_controller_name, subnetwork_name, tier_name, description, notes) | The EnableSubnetworkController method enables a subnetwork controller. Subnetwork controllers are set on the terminal of a device or junction object to represent the origin of a subnetwork. |
HasValidNetworkTopology () | The HasValidNetworkTopology method checks whether the network topology is enabled. Ensuring that the utility network's topology is enabled is helpful before creating associations and modifying subnetwork controllers. |
方法
AddConnectivityAssociation (association_type, from_table, from_global_id, from_terminal_name, to_table, to_global_id, to_terminal_name, percent_along)
パラメーター | 説明 | データ タイプ |
association_type | An integer value representing the type of connectivity association that will be created.
| Integer |
from_table | The table name of the from object. | String |
from_global_id | The global ID of the from object. | String |
from_terminal_name | The terminal name of the from object. | String |
to_table | The table name of the to object. | String |
to_global_id | The global ID of the to object. | String |
to_terminal_name | The terminal name of the to object. | String |
percent_along | The percentage along the edge where the connection occurs. This is only used for midspan connectivity.. | Float |
データ タイプ | 説明 |
Integer | The object ID of the new connectivity association. |
import arcpy
editor = arcpy.da.Editor(r"C:\testData\SDK_UtilityNetwork.geodatabase")
# Pass in the utility network layer
myUtilityNetwork = arcpy.un.UtilityNetwork(
r"C:\testData\SDK_UtilityNetwork.geodatabase\main.TestNetwork\main.TestNetwork")
if not editor.isEditing:
editor.startEditing()
editor.startOperation()
object_id = myUtilityNetwork.AddConnectivityAssociation(
1, "WaterDevice","{41D5BFC0-BFED-40A1-AB1A-02B0D69FB835}",
"High Pressure In", "WaterDevice",
"{D8F5535D-36B1-485E-97D3-E92E453CC11E}", "Port One", 0)
if editor.isEditing:
editor.stopOperation()
editor.stopEditing(True)
AddContainmentAssociation (container_table, container_global_id, content_table, content_global_id, is_content_visible)
パラメーター | 説明 | データ タイプ |
container_table | The table name of the container object. | String |
container_global_id | The global ID of the container object. | String |
content_table | The table name of the content object. | String |
content_global_id | The global ID of the content object. | String |
is_content_visible | Specifies whether the content will be visible. | Boolean |
import arcpy
editor = arcpy.da.Editor(r"C:\testData\SDK_UtilityNetwork.geodatabase")
# Pass in the utility network layer
myUtilityNetwork = arcpy.un.UtilityNetwork(
r"C:\testData\SDK_UtilityNetwork.geodatabase\main.TestNetwork\main.TestNetwork")
if not editor.isEditing:
editor.startEditing()
editor.startOperation()
myUtilityNetwork.AddContainmentAssociation(
"StructureBoundary", "{A498A20B-C086-48C9-993D-F71231037806}",
"WaterDevice", "{90483407-0BBF-48FF-A7B8-D3D26313A7CB}", True)
if editor.isEditing:
editor.stopOperation()
editor.stopEditing(True)
AddStructuralAttachmentAssociation (structure_table, structure_global_id, attachment_table, attachment_global_id)
パラメーター | 説明 | データ タイプ |
structure_table | The table name of the structure object. | String |
structure_global_id | The global ID of the structure object. | String |
attachment_table | The table name of the attachment object. | String |
attachment_global_id | The global ID of the attachment object. | String |
データ タイプ | 説明 |
Integer | The object ID of the new attachment association. |
import arcpy
editor = arcpy.da.Editor(r"C:\testData\SDK_UtilityNetwork.geodatabase")
myUtilityNetwork = arcpy.un.UtilityNetwork(
r"C:\testData\SDK_UtilityNetwork.geodatabase\main.TestNetwork\main.TestNetwork")
if not editor.isEditing:
editor.startEditing()
editor.startOperation()
object_id = myUtilityNetwork.AddStructuralAttachmentAssociation(
"StructureJunction", "{529DE843-659D-499B-AF2A-FA8E47E89CAD}",
"ElecDistDevice", "{505C79BC-1019-4A71-85B5-F4D38F6E0C6E}")
if editor.isEditing:
editor.stopOperation()
editor.stopEditing(True)
DeleteConnectivityAssociation (association_type, association_global_id)
パラメーター | 説明 | データ タイプ |
association_type | An integer value representing the type of connectivity association that will be deleted.
| Integer |
association_global_id | The global ID of the association that will be deleted. | String |
import arcpy
editor = arcpy.da.Editor(r"C:\testData\SDK_UtilityNetwork.geodatabase")
myUtilityNetwork = arcpy.un.UtilityNetwork(
r"C:\testData\SDK_UtilityNetwork.geodatabase\main.TestNetwork\main.TestNetwork")
if not editor.isEditing:
editor.startEditing()
editor.startOperation()
myUtilityNetwork.DeleteConnectivityAssociation(
1, "{0356CDD1-C44A-4273-8EE7-73A27EFEF116}")
if editor.isEditing:
editor.stopOperation()
editor.stopEditing(True)
DeleteContainmentAssociation (association_global_id)
パラメーター | 説明 | データ タイプ |
association_global_id | The global ID for the specified containment association in the utility network. | String |
import arcpy
editor = arcpy.da.Editor(r"C:\testData\SDK_UtilityNetwork.geodatabase")
myUtilityNetwork = arcpy.un.UtilityNetwork(
r"C:\testData\SDK_UtilityNetwork.geodatabase\main.TestNetwork\main.TestNetwork")
if not editor.isEditing:
editor.startEditing()
editor.startOperation()
myUtilityNetwork.DeleteContainmentAssociation(
"{8513D6CE-0416-4967-BBCC-591A1C34CF4A}")
if editor.isEditing:
editor.stopOperation()
editor.stopEditing(True)
DeleteStructualAttachmentAssociation (association_global_id)
パラメーター | 説明 | データ タイプ |
association_global_id | The global ID of the specified structural attachment association in the utility network. | String |
import arcpy
editor = arcpy.da.Editor(r"C:\testData\SDK_UtilityNetwork.geodatabase")
# Pass in the utility network layer
myUtilityNetwork = arcpy.un.UtilityNetwork(
r"C:\testData\SDK_UtilityNetwork.geodatabase\main.TestNetwork\main.TestNetwork")
if not editor.isEditing:
editor.startEditing()
editor.startOperation()
myUtilityNetwork.DeleteStructuralAttachmentAssociation(
"{549DE843-659D-499B-AF2A-FA8E47E89CAD}")
if editor.isEditing:
editor.stopOperation()
editor.stopEditing(True)
DisableSubnetworkController (table, global_id, terminal_name)
パラメーター | 説明 | データ タイプ |
table | The table name to which the subnetwork controller is assigned. | String |
global_id | The global ID for the feature to which the subnetwork controller is assigned. | String |
terminal_name | The name of the terminal to which the subnetwork controller is assigned. | String |
import arcpy
editor = arcpy.da.Editor(r"C:\testData\SDK_UtilityNetwork.geodatabase")
myUtilityNetwork = arcpy.un.UtilityNetwork(
r"C:\testData\SDK_UtilityNetwork.geodatabase\main.TestNetwork\main.TestNetwork")
if not editor.isEditing:
editor.startEditing()
editor.startOperation()
myUtilityNetwork.DisableSubnetworkController(
"ElecDistDevice", "{A6BFF336-92F9-45F0-8ACE-AAD6137E5E2B}", "Side1")
if editor.isEditing:
editor.stopOperation()
editor.stopEditing(True)
EnableSubnetworkController (table, global_id, terminal_name, subnetwork_controller_name, subnetwork_name, tier_name, description, notes)
パラメーター | 説明 | データ タイプ |
table | The table name to which the new subnetwork controller will be assigned. | String |
global_id | The global ID for the feature to which the new subnetwork controller will be assigned. | String |
terminal_name | The name of the terminal on which the new subnetwork controller will be assigned. | String |
subnetwork_controller_name | The name of the new subnetwork controller. | String |
subnetwork_name | The name of the subnetwork on which the subnetwork controller participates. | String |
tier_name | The name of the tier to which the subnetwork controller belongs. | String |
description | A description of the new subnetwork controller. | String |
notes | Notes for the new subnetwork controller. | String |
データ タイプ | 説明 |
Integer | The object ID of the new row in the subnetworks table. |
import arcpy
editor = arcpy.da.Editor(r"C:\testData\SDK_UtilityNetwork.geodatabase")
# Pass in the utility network layer
myUtilityNetwork = arcpy.un.UtilityNetwork(
r"C:\testData\SDK_UtilityNetwork.geodatabase\main.TestNetwork\main.TestNetwork")
if not editor.isEditing:
editor.startEditing()
editor.startOperation()
object_id = myUtilityNetwork.EnableSubnetworkController(
"PipelineDevice", "{560FCA60-62B4-4B40-8CD9-9986AD63FA10}", "Terminal One",
"#2-213 - Batchelder HP T1", "213 - Batchelder HP", "Cathodic Read Location",
"Some Description", "No Notes")
if editor.isEditing:
editor.stopOperation()
editor.stopEditing(True)
HasValidNetworkTopology ()
データ タイプ | 説明 |
Boolean | A return Boolean value of True indicates that the topology for the utility network is enabled. |
import arcpy
myUtilityNetwork = arcpy.un.UtilityNetwork(
r"C:\path\to\data\testdata1.sde\ELEC.TestNetwork\ELEC.TestNetwork")
is_valid = myUtilityNetwork.HasValidNetworkTopology()