POST
|
I have a number of Unique ID number fields sent to me from 3rd party applications that have values with greater than 15 characters. The result is all my UIDs are displaying as scientific notation which is irritating. As far as I can see I have 2 options. 1. manually adjust every field to display as custom , for every table I encounter this problem... as per the instructions here: https://support.esri.com/en/technical-article/000025340 2. Add text field, calculate text field with problematic number field. Both solutions are also irritating. Is there a global option somewhere that automatically tells it not to be scientific and show me all of the digits in my numbers? Thanks!
... View more
01-11-2023
01:16 PM
|
0
|
0
|
396
|
POST
|
Thanks Carmen, I'll add that since that change was made and since my post above, our server has run all of its tasks successfully, without fail, for 30 days so. I am satisfied that we resolved the cause of our issue.
... View more
11-30-2022
09:48 AM
|
0
|
0
|
913
|
POST
|
Sorry for the long story here but this is everything I did to trouble shoot and resolve this issue over the course of a long time and I wanted to share in case anybody else is stuck as I was. Whenever I schedule scripts to run using Windows task Scheduler, sometimes they run and sometimes they do not. It seems intermittent and random for when they would choose to fail. 0xF6 is the “Last Run Result” we would receive in windows task scheduler. Note that this problem only started after I converted my scripts from python 2.7 to 3.x and started using the pro interpreter. 2.7 never had any problems but I need to switch to 3.x Note also that the scripts always run no matter what when I manually run them. This is only a scheduled task problem We are using VM server with windows datacenter 2022 but we were experiencing the same problems on an older VM running an older OS, maybe Windows Server 2016. We tried switching from python.exe to pythonw.exe did not resolve the issue. We tried setting up a batch file (.bat) to execute the scripts and then have task scheduler execute the batch file and this had the same result. I tried making lots of changes in task scheduler like Run with Highest Privileges, run whether user is logged on or not, run only when user is logged in, making sure user is logged in, etc., no combination of these had any effect. Speaking with Esri support they recommended the following: 1. Import script into .tbx as script tool then schedule to run from within Pro, this will add it to task scheduler anyway but it creates its own task with error logging. 2. Use a .tbx rather than .atbx (since .atbx is new and might have kinks to iron out. 3. Open the task in task scheduler to find the path to the new task.py and open that to see the path to where the logs are created. Should be something like this: "C:\Users\me\AppData\Local\ESRI\ArcGISPro\Geoprocessing\ScheduledTools\NameOfYourProject\task.py" 4. Then you can open the logs to see meaningful errors not just the meaningless 0xf6 in Task Scheduler. With meaningful errors you can work to resolve the issue. So I did that and it still failed with 0xF6 and I found that in fact the logs were not being created at all which suggested that the pythonw.exe was not even being allowed to start executing since not even an empty log was created. So we asked IT to check the anti-virus and other security systems on the server that might be preventing it from executing. They found no issues. Finally, IT checked some local security policies. There’s a local security policy on each server that they set to prevent bad guys from mining bitcoins I guess. They adjusted these to add the “logon as a batch job” permission for my user on that server. Finally the 0xf6 errors stopped and everything runs as it should for the past week. So hopefully I’m not speaking too soon but this looks resolved for me. I hope this helps somebody else.
... View more
10-28-2022
08:29 AM
|
0
|
2
|
990
|
POST
|
Just for reference I modified my approach to no longer output intermediates to hard disk. import arcpy
# samplept is a point feature class with xcoord, ycoord fields as double, calculated geometry to wgs84,
#also added dist field, and bearing fields both as double, both field calculated with the distance and bearing values.
input_table = r"C:\Data\Points\points_data.gdb\samplept"
output_line = r"in_memory\bearingLine"
# BearingDistanceToLine
#https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/bearing-distance-to-line.htm
arcpy.BearingDistanceToLine_management(input_table, output_line, 'xcoord', 'ycoord', 'dist',
'KILOMETERS', 'bearing', 'DEGREES','GEODESIC')
#Feature-vertices-to-points.htm
#https://pro.arcgis.com/en/pro-app/2.8/tool-reference/data-management/feature-vertices-to-points.htm
out_point = r"in_memory\bearingPoints"
arcpy.management.FeatureVerticesToPoints(output_line, out_point, "END")
... View more
04-26-2022
08:16 AM
|
1
|
0
|
1026
|
POST
|
From a point feature class as input: import arcpy
# samplept is a point feature class with xcoord, ycoord fields as double, calculated geometry to wgs84,
#also added dist field, and bearing fields both as double, both field calculated with the distance and bearing values.
input_table = r"C:\Data\Points\points_data.gdb\samplept"
output_line = r"C:\Data\Points\points_data.gdb\bearingLine"
# BearingDistanceToLine
#https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/bearing-distance-to-line.htm
arcpy.BearingDistanceToLine_management(input_table, output_line, 'xcoord', 'ycoord', 'dist',
'KILOMETERS', 'bearing', 'DEGREES','GEODESIC')
#Feature-vertices-to-points.htm
#https://pro.arcgis.com/en/pro-app/2.8/tool-reference/data-management/feature-vertices-to-points.htm
out_point = r"C:\Data\Points\points_data.gdb\bearingPoints"
arcpy.management.FeatureVerticesToPoints(output_line, out_point, "END")
output is point feature class also.
... View more
04-25-2022
03:01 PM
|
1
|
2
|
1097
|
IDEA
|
I'll add +1 for upvote please! I have Pro 2.9.2 . A feature class with many subtypes, and each has their own domain. When I try to select by attributes OR set a SQL query for labeling I try to click the dropdown to see what attributes are available but I am only able to see values from a single domain for a single subtype. I even try to be smart and use a more complex query: select where: subtypeField = "my subtype" AND featuteCode = "myValue" but the dropdown list for my feature codes does not populate beyond what's in the first subtype's domain. So essentially I need to keep a list on the side of dissolved attributes for my feature classes with subtypes in order to be able to write sql queries quickly. ArcMap had no issue with just showing us all the values and when we want to symboloize the symbology pane does it fine... why not this?
... View more
04-22-2022
02:37 PM
|
0
|
0
|
1080
|
POST
|
It turns out thanks to ESRI support, that the issue is in Model Builder, each output has a parameter that marks it as "Intermediate" or not. When checked the model deletes the intermediate at conclusion of the model. This does not apply if running the model within Model Builder, but does apply if executing the model outside of Model Builder such as with python. Right click the output of the tool and uncheck "Intermediate" to turn this off. https://desktop.arcgis.com/en/arcmap/latest/analyze/modelbuilder/preserving-intermediate-data.htm
... View more
04-08-2021
10:54 AM
|
1
|
0
|
1075
|
POST
|
I don't think models can be scheduled tasks unless run as python. https://support.esri.com/en/technical-article/000009370 Thanks for your help.
... View more
04-08-2021
08:07 AM
|
1
|
1
|
1080
|
POST
|
Hi, I did not convert model to python, just executing model from python as a means to run as a scheduled task. I added the relevant python code but I don't think that's the source of the problem because it doesn't do much. Thanks, James
... View more
04-08-2021
07:25 AM
|
0
|
0
|
1090
|
POST
|
I'm assuming your tiff is raster data similar to elevation DEM and that you are running data driven pages and that each page has a different scale. Depending on the circumstances one approach may be to add the .tiff to the data frame multiple times, 1 each for different page scales then set the symbology that is appropriate for each page. Then set each of the layer instances to be visible only at the intended scales. Thus assuming when you run data driven pages the scale changes for each page and the appropriate tiff is displayed.
... View more
04-08-2021
07:00 AM
|
0
|
0
|
405
|
POST
|
I created a model using ArcMap 10.8 and save in toolbox. It starts by creating a new FGDB with _TodaysDate variable in the name and saving to local drive. Then generates a number of feature classes and saves into GDB. Then using those intermediate outputs, appends data to SDE feature classes. That is it. The model does not have any delete functionality (except delete features on some SDE feature classes that are being appended to). The model runs successfully in model builder edit mode, including the updates to SDE, and the creation of FGDB and all the intermediate Feature classes inside. When I run the model from Python 2.7 it runs successfully and updates the SDE but the feature classes inside the FGDB get deleted before python finishes executing. The FGDB does not get deleted. The only thing the python does is is execute the model and then email me to tell me about it. No deleting is programmed. What could be causing the feature classes to get deleted after the append which is the last step in the model? Any Thoughts? Edit to add relevant code from python: #model update
m1 = "m1 not complete "
m2 = "m2 not complete "
try:
tbx = arcpy.AddToolbox(r"E:/toolboxpath/toolbox.tbx")
print tbx
print "model update started"
tbx.PRODNS()
m1 = "m1 Complete"
tbx.PRODSAO()
m2 = "m2 Complete"
print "model update complete"
send_email('not_my_real_email@fakeemail.fake',
'CENSUS DATA UPDATED',
'CENSUS DATA UPDATED BOTH MODELS',
'')
except arcpy.ExecuteError:
message = str(m1 + m2 + arcpy.GetMessages(2))
print(arcpy.GetMessages(2))
send_email('not_my_real_email@fakeemail.fake',
'FAILED CENSUS UPDATE FAILED',
message,
'')
... View more
04-08-2021
06:52 AM
|
0
|
6
|
1132
|
POST
|
Hi Karen. I would guess that you are trying to run a geoprocessing tool using an input that is invalid: namely the published service which is a "REST" end point outputting into JSON format. Inputs needs to be a table view: https://desktop.arcgis.com/en/arcmap/10.3/tools/analysis-toolbox/summary-statistics.htm My work around would be to connect to the rest end point, convert JSON to feature class , FC to LAYER either in memory or on the hard drive, then run the geoprocessing tool. something like this: import urllib2, arcpy, os myurl=r"http://server.arcgisonline.com/arcgis/rest/services/Reference/World_Transportation/MapServer/0" JSON_OUT = r"C:\DATA\text.json" response = urllib2.urlopen(myurl) myJSON = response.read() foo = open(JSON_OUT, "wb") foo.write(myJSON) foo.close() arcpy.JSONToFeatures_conversion(JSON_OUT, r"C:\DATA\local_Mercator2.gdb\JSON") https://gis.stackexchange.com/questions/244411/how-to-access-a-secured-arcgis-rest-api-using-python-and-extract-the-data-in-the
... View more
12-31-2019
02:40 PM
|
0
|
0
|
1102
|
POST
|
Ken Buja, you are the best, most capable Bro on GeoNet today. I was all Ric Flair over here when I saw your response. Ric Flair Woo - YouTube 3 gold stars!
... View more
12-17-2019
02:23 PM
|
1
|
0
|
1456
|
POST
|
Ken Buja, you are the best, most capable Bro on GeoNet today. I was all Ric Flair over here when I saw your response. Ric Flair Woo - YouTube 3 gold stars!
... View more
12-17-2019
02:23 PM
|
0
|
0
|
1456
|
Title | Kudos | Posted |
---|---|---|
1 | 04-26-2022 08:16 AM | |
1 | 04-25-2022 03:01 PM | |
1 | 12-17-2019 02:23 PM | |
1 | 04-08-2021 10:54 AM | |
1 | 04-08-2021 08:07 AM |
Online Status |
Offline
|
Date Last Visited |
06-12-2023
06:44 PM
|