I'm writing a python script tool for ArcGIS Pro that uses a custom GUI created with pyqt. I would like the tool to be able to add and remove layers from the main map in the ArcGIS Pro project it is run from. This works fine normally, but I'm also trying to run the tool in a separate thread so that I can continue using other geoprocessing tools (see here). I can still add layers to the project and save the changes using my GUI, but since I am referencing the project by its full path (rather than
arcpy.mp.ArcGISProject("CURRENT")), the new layers won't show up unless I close the project and open it again.
Is there anyway to 'reload' an aprx project that has been modified by another process without closing it first?