Released with Pro 3.2 is the ability to read and update the active parcel record in a map containing a parcel fabric.
Using ArcPy CIM Access, this set of properties will allow users to automate:
The Cartographic Information Model (CIM) provides access to many settings and properties of ArcGIS Pro that may not have a publicly exposed API through the ArcPy.mp module. Starting at Pro 3.2, the CIM now contains the following properties:
Type | Property | Description |
Bool | isParcelFabricLayer | Denotes the layer is of type ParcelFabricLayer |
String | activeRecord | The GlobalID value of the active record (if set) |
Bool | enabled | Is the parcel record set in the current map? (True | False) |
Bool | showActiveRecordOnly | Should the map only display features participating in the active record |
A typical workflow may be:
# Full script for Python Window.
# Replace "CURRENT" with path to target Pro Project to run outside of Pro
# access the project and map
current_project = arcpy.mp.ArcGISProject("CURRENT")
target_map = current_project.listMaps()[0]
print(target_map.name)
# test the parcel fabric exists by its name
map_layers = target_map.listLayers()
parcel_layer = [lyr for lyr in map_layers if lyr.isParcelFabricLayer][0]
# if the parcel fabric exists, check for the parcelFabricActiveRecord property
if parcel_layer:
# get current CIM object
parcel_cim_def = parcel_layer.getDefinition("v3")
# if the active record is not set, set it.
if not parcel_cim_def.parcelFabricActiveRecord.activeRecord:
# Set the new values
parcel_cim_def.parcelFabricActiveRecord.activeRecord = "6B1431DA-1D9B-4B69-BD24-79EB643D8C98"
parcel_cim_def.parcelFabricActiveRecord.enabled = True
parcel_cim_def.parcelFabricActiveRecord.showActiveRecordOnly = True
# save the CIM definition, save project, open the map (optional)
parcel_layer.setDefinition(parcel_cim_def)
current_project.save()
target_map.openView()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.