Select to view content in your preferred language

Active map join issues with GP script tool

243
1
04-11-2024 12:02 PM
JackC
by
New Contributor II

Hi Everyone,

I have a python script used as a GP tool in ArcGIS Pro 3.2, that makes a copy of a base project, and operates on the copy: applying a new FGDB to it, performing joins and layout manipulation, and spitting out a PDF of the layout. The base project's layout has two map frames, and I've found that if one is selected (shows as bold; one is always selected I've noticed), and then I save the project and run the tool (meaning the copy also shows this map frame as selected), a join on the layer in that 'active' map frame is not updated. It just refuses to update the join for the layer in that map frame (I've spit out lyr.connectionProperties for before and after join operations to compare). The layer in the other map frame has no problem with removing and creating a new join.

Has anyone ever encountered this before? Any good way around it? I am actively thinking of a way to circumvent this by changing the active map to the one I'm not working on, and then swap to work on the other map.

Thanks!

- Jack C

0 Kudos
1 Reply
JackC
by
New Contributor II

Update: I found a way around it, though I don't love it. In my base project, I added a blank MapFrame to each layout and ensured that this blank MapFrame was the selected one. Then I saved the base project and ran the tool against it. This updated all joins properly in the copy of the project, since the map frames with target layers for join updates were not selected. Not my favorite work-around, but it does work.

I would still love to know if anyone has encountered this and found a better way around it.

0 Kudos