POST
|
Ihab thanks for responding, my user has admin rights to all the project folders. Also I'm not sure why it's still referencing the default python library. In Pro, I cloned the default python library and use it as the default library, which is saved on the C: drive. One other note is that the code was written in python 2.7.16. Not sure if that makes a difference. These are the lines to the line 686 error: for project_service_map_object in project_service_map_list: if project_service_map_object.name == r"1_Service_Status_On": print("Captured -- " + project_service_map_object.name) print("Creating a List of Layers in " + project_service_map_object.name) project_service_layers_list = project_service_map_object.listLayers("*") print("Updating Data Source for All Layers in the 1_Service_Status_On Map") for layer in project_service_layers_list: if not (layer.isGroupLayer or layer.isBasemapLayer): print("Before: " + str(layer.name)) pprint.pprint(layer.connectionProperties) layer.updateConnectionProperties( current_connection_info=project_energizer_sde_workspace, new_connection_info=p_userconnection_workspace_full_path, auto_update_joins_and_relates=True, validate=True, ignore_case=True) project_service_aprx_object.save()
... View more
11-30-2021
06:51 PM
|
0
|
0
|
3824
|
POST
|
I have a code that a developer created that no long works for me. With a recent upgrade from 2.8.x to 2.9, the script no errors out at a line " project_service_aprx_object.save()". What I believe the code is trying to do update the source of feature layers in a map ("1_Service_Status_On"). However, when it comes to the project_service_aprx_object.save() line, it gives me the following error: Traceback (most recent call last): File "<string>", line 686, in <module> File "A:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\_mp.py", line 285, in save return convertArcObjectToPythonObject(self._arc_object.save(*gp_fixargs((), True))) OSError: G:\SDE_User_Connections\Projects\UnitedStates\US_Test01\Web_Services\Test01_Project_Services.aprx I'm running the code in an empty APRX file so I don't even have the Test01_Project_Services.aprx open. I'm a novice at python so any I can provide more of the code if necessary.
... View more
11-23-2021
02:26 PM
|
0
|
22
|
6390
|
POST
|
I have a REST maintenance script that I inherited that was written for ArcGIS Pro 2.6. It checks to see if the AGS connection is valid. ### ArcServer Connection ### arcserver_ags_file = r"D:\_AGS_Connection\giswebsite@ArcServer@GIS_Admin.ags" #### ArcServer Check ### if arcpy.Exists(arcserver_ags_file) == True: print("The following arcserver_ags_file will be used: " + str(arcserver_ags_file)) if arcpy.Exists(arcserver_ags_file) == False: print("Stopping the script because your arcserver_ags_file is not set or does not exist.") exit() Since the upgrade from Pro 2.6 to 2.8.2, the script ends because it doesn't recognize the AGS file. The user has full access to the file location and verified that the AGS connection is accessible and able to connect to it. I'm a beginner at python that can interpret/understand code but by no means considered a developer. Any assistance in getting this solved is much appreciated.
... View more
09-09-2021
09:06 AM
|
0
|
2
|
760
|
POST
|
I definitely think this would be a useful tool. I too have been trying to find a solution in producing a heat map based on attributes of a feature. I may have to resort to creating grids within ArcMap and publishing them as a service. It would be nice to have a dynamic map though that changes based on the view extent.
... View more
12-11-2012
06:14 AM
|
0
|
0
|
175
|
POST
|
I found a solution through another thread, however wasn't able to find the exact link. But using Spatial Analyst, run the => Local => Combine tool on the image that you want to convert. This will assign a unique number for each unique color and create a new raster. You can then use the Conversion Tools => From Raster => Raster to Polygon tool. You still need to manually assign the attributes manually accordingly once the polygon feature is created.
... View more
11-16-2011
11:01 AM
|
0
|
0
|
3439
|
Online Status |
Offline
|
Date Last Visited |
07-17-2023
07:31 PM
|