Synthèse
The properties below are returned by the validDevices object when using Describe on a utility network.
Propriétés
Propriété | Explication | Type de données |
assetGroupCode (Lecture seule) | The asset group code of the valid device. | Integer |
assetTypes (Lecture seule) | The assetTypes object. This object can be used to retrieve the assetTypeCode of the valid device's asset types. The assetTypeCode is the integer value of the asset type code of the valid device. | Object |
Exemple de code
Retrieve the asset type code for the assetTypes object for a valid device.
# Import required modules
import arcpy
# Describe functions on a Utility Network
UN = "C:\\Projects\\MyProject\\unowner.sde\\Naperville.UNOWNER.Naperville\\Naperville.UNOWNER.Naperville"
d = arcpy.Describe(UN)
# Domain Network properties
domnets = d.domainNetworks
# For each domain network in the utility network
for dom in domnets:
# For each tier in the domain network
for tier in dom.tiers:
# Print the valid device Properties
for vd in tier.validDevices:
print(" -- Valid Devices Properties -- ")
print("Asset Group Code: {0} \n".format(vd.assetGroupCode))
print(" - Asset Type Properties - ")
for at in vd.assetTypes:
print("Asset Type Code: {0}".format(at.assetTypeCode))
Vous avez un commentaire à formuler concernant cette rubrique ?