| Numéro d’ID de bogue |
BUG-000126288 |
| Envoi | October 25, 2019 |
| Dernière modification | February 14, 2025 |
| S’applique à | ArcGIS Pro |
| Version trouvée | N/A |
| Système d’exploitation | Windows OS |
| Version du système d’exploitation | 10.0 |
| Statut | Will Not Be Addressed
L’équipe de développement a examiné le problème ou la demande et a décidé qu’ils ne seraient pas traités. Pour d’autres explications, reportez-vous à la section Informations supplémentaires correspondant au problème.
|
Informations supplémentaires
When joins are present on a layer, the connection properties dictionary includes the join information. The dictionary is different for layers with joins vs layers without joins. The difference in dictionary structure needs to be accounted for in the script. Layers can have zero, one or many joins. Use a recursive function to accomplish this:
```import arcpydef ConPropsWithJoins(cp): if 'source' in cp: return ConPropsWithJoins(cp['source'])
else:
print(' ', '- database:', cp['connection_info']['database'])
print(' ', '- dataset:', cp['dataset'])
print(' ', '- workspace_factory:', cp['workspace_factory'])aprx = arcpy.mp.ArcGISProject(r"C:\temp\fgdb_012joins.aprx")m = aprx.listMaps()[0]for lyr in m.listLayers(): print(f"LAYER: {lyr.name}")
if lyr.supports("dataSource"): cp = lyr.connectionProperties
if cp is not None: ConPropsWithJoins(cp)```
Étapes pour reproduire
ID de bogue: BUG-000126288
Logiciel: