POST
|
Hi, I'm using the code below, but I can't figure out how I can limit my output to just one role (Role = Viewer). Thanks import csv from arcgis.gis import GIS gis = GIS("<Portal URL>", "<UserName>", "<Password>", verify_cert=False) outputFile = r"<Output File Location>" users = gis.users.search('*', max_users=15000) with open(outputFile, 'w', newline='') as ResultFile: wr = csv.writer(ResultFile) header = 'Username', 'Role', 'Email' wr.writerow(header) for user in users: UserRow = user.username, user.role, user.email wr.writerow(UserRow)
... View more
01-18-2023
05:51 AM
|
0
|
2
|
929
|
POST
|
Hi, Wondering if you ever figured this out? I'm using the code below, but I can't figure out how I can limit my output to just one role (Role = Viewer). import csv from arcgis.gis import GIS gis = GIS("<Portal URL>", "<UserName>", "<Password>", verify_cert=False) outputFile = r"<Output File Location>" users = gis.users.search('*', max_users=15000) with open(outputFile, 'w', newline='') as ResultFile: wr = csv.writer(ResultFile) header = 'Username', 'Role', 'Email' wr.writerow(header) for user in users: UserRow = user.username, user.role, user.email wr.writerow(UserRow)
... View more
01-18-2023
05:48 AM
|
0
|
0
|
649
|
POST
|
I have a spatial join where I'm joining points in polygons. What's the easiest way to have the attributes in the output feature only retain one attribute from the Target Feature and one or more from the Join Feature? Thanks
... View more
09-19-2022
12:00 PM
|
0
|
2
|
446
|
POST
|
Hi, Assets IS a feature class in a File GDB. Is there a way to run the selection on the FC? Thanks
... View more
08-16-2022
05:10 AM
|
0
|
2
|
432
|
POST
|
got this error ---------------------------------------------------------------------------
ExecuteError Traceback (most recent call last)
In [9]:
Line 20: arcpy.SpatialJoin_analysis(asset_sel, polygonLayer01, "asset_join_poly01", "JOIN_ONE_TO_MANY", "KEEP_COMMON", "", "INTERSECT")
File C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\analysis.py, in SpatialJoin:
Line 793: raise e
File C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\analysis.py, in SpatialJoin:
Line 790: retval = convertArcObjectToPythonObject(gp.SpatialJoin_analysis(*gp_fixargs((target_features, join_features, out_feature_class, join_operation, join_type, field_mapping, match_option, search_radius, distance_field_name), True)))
File C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py, in <lambda>:
Line 512: return lambda *args: val(*gp_fixargs(args, True))
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000732: Target Features: Dataset GIS_ASSET_DETAIL_Layer17 does not exist or is not supported
Failed to execute (SpatialJoin).
---------------------------------------------------------------------------
In [ ]:
... View more
08-15-2022
12:50 PM
|
0
|
0
|
456
|
POST
|
I feel like I'm missing something simple here. All I want to do is select a subset from a layer based on an attribute and then do a spatial join of just the subset to a polygon layer. Script works fine, but it's executing the spatial join against the entire layer, not just the selected records. # Execute Select arcpy.management.SelectLayerByAttribute(asset, "NEW_SELECTION", '"COORDINATE_VALID_DATE" = CURRENT_DATE' ) #Execute Spatial Join arcpy.SpatialJoin_analysis(asset, polygonLayer01, "asset_join_poly01", "JOIN_ONE_TO_MANY", "KEEP_COMMON", "", "INTERSECT") Thanks
... View more
08-15-2022
10:31 AM
|
0
|
6
|
497
|
POST
|
Not to get completely off track but this is the closest thread I could find to what I'm trying to figure out. I want to figure out the opposite of this. I have a point within a polygon and I want to find the distance to the furthest point on the edge of the polygon. I know I could use the measure tool and try to figure it out manually, but my polygon has a very irregular edge, and I need to run this against multiple polygons, so I figured I could merge the polygons and run it against the single point.
... View more
09-24-2021
05:52 AM
|
0
|
0
|
568
|
POST
|
Is it possible to apply the Summary Widget to a group of selected features instead of everything in the current extent?
... View more
08-23-2021
06:04 AM
|
0
|
0
|
320
|
POST
|
Thanks. I'm familiar with creating a map series...what I'm working toward requires bookmarks...thanks for the thought.
... View more
07-06-2021
10:17 AM
|
0
|
0
|
1436
|
POST
|
Is there a way to auto-generate bookmarks based on a series of point features? I have a layer with about 200 points. I’d like to auto-generate a bookmark for each site at the same zoom scale.
... View more
07-06-2021
05:19 AM
|
3
|
5
|
1508
|
POST
|
Does anyone have a recommendation for where to put the rel=noopener noreferrer tag?
... View more
04-07-2020
07:06 AM
|
0
|
0
|
243
|
POST
|
I just ran into this problem. Were you ever able to find a solution?
... View more
04-12-2019
07:40 AM
|
0
|
0
|
457
|
Title | Kudos | Posted |
---|---|---|
3 | 07-06-2021 05:19 AM | |
1 | 04-13-2017 10:51 AM | |
1 | 12-21-2016 06:12 AM | |
1 | 04-01-2015 01:40 PM |
Online Status |
Offline
|
Date Last Visited |
a week ago
|