I am new to ArcGIS Pro and to Python Programming. I recently made a python script intended to iteratively add raster layer to my 3D scene, then generate a TIFF and remove the raster layer and move on to the next iteration. When I run the script, ArcGIS Pro crashes. I have no idea how to proceed further. Any help will be much appreciated. I attached the python script to this message, for your reference.
Thanks for the response Dan.
I ran through the process using the Python command line prompt within ArcGIS Pro first (without for loop though). It worked without have any issues then. After that I created the script and ran without For loop for just one raster, and it worked. It is when I put the For loop in, when it started crashing.
EDIT: I was able to isolate the crash trigger to "sc1.removeLayer(layer)". Any thoughts?
I would make sure that the layer is indeed there prior to removelayer by printing its path. I am wondering if removelayer is the correct approach if you aren';t actually running this with arcmap open. It may be delete layer. In any event, check the sizes of the files and just leave them alone until the process runs then delete later if possible. If not, try it in Pro
Thanks for your suggestion Dan. This issue is solved now. As you suggested, I first created raster layers in the proper symbology and ran the script to add raster layers and iterated through the layer list to export the tiff images.
I appreciate your help!