|
POST
|
Hi All, In ArcPro, I can connect to my Azure blob storage container using the SAS token by setting the token value in the Provider Options: AZURE_STORAGE_SAS_TOKEN property. However the 'Provider Options' values are not accessible in the UI dialog for either ArcGIS Server manager nor ArcGIS Portal. Does this mean we CAN'T use a SAS token to register the Azure blob storage container in enterprise? Maybe using the REST endpoint? So far no luck figuring out a syntax there. When we try thru the ArcPRO UI, we get critical failure with the "Report to Esri" dialog box 😞 Thanks
... View more
07-26-2023
03:18 PM
|
1
|
1
|
1407
|
|
POST
|
I've tried changing inputs to the GP tool to get ANY kind of change to the outputs. In fact the 'metadata' listed on the raster properties never updates either. Example, below. I used skip factor 2,2. No change to the stats. 'Build Parameters' info doesn't show a change either.
... View more
03-10-2023
03:00 PM
|
0
|
0
|
946
|
|
POST
|
Hi All I have file geodatabase raster. When i loop over the cells i find the MIN value is 6.6, the 'stats' MIN value is 4.5. I've run the CalcStats tool, with the 'OVERWRITE' option but never get to the 6.6 value. (MAX also appears incorrect as well. I've used CopyRaster to export the fgdb raster as both ASCII and TIFF. Both exported rasters display expected MIN/MAX stats. When I re-import the ASCII or TIFF back into the fgdb. The stats are the expected values. So why does DEM have the wrong stats to begin with --- was generated from a 'clip/extract'? and why doesn't the CalcStats tool update to the correct values? Thanks
... View more
03-10-2023
12:23 PM
|
0
|
2
|
1043
|
|
POST
|
Hi Got an odd one with the charts module and MakeFeatureLayer. Code will work fine if you run it inside the ArcPro py window but if it's outside ArcPro as standalone script or run from inside a GP toolbox script, the result is a catastrophic app crash with the 'please report crash dialog' showing up 😞 basic code: import arcpy
import os
source_fc = "chart-issues.gdb\\pts"
profile_name = "AB"
query_def = "Name='{}'".format(profile_name)
print(query_def)
r_chart_layer = arcpy.management.MakeFeatureLayer(source_fc, "chart_layer", query_def, None, None)
profile_chart = arcpy.charts.Line(
x="M",
y=["Z"],
dataSource = r_chart_layer.getOutput(0),
title="Elevation Over Distance: {}".format(profile_name),
xTitle = "Distance (Feet)",
yTitle = "Elevation (Feet)"
)
print("chart initialized")
chart_path = arcpy.CreateUniqueName(os.path.join("{}.svg".format(profile_name)), arcpy.env.scratchFolder)
print(chart_path)
profile_chart.exportToSVG(chart_path, 500, 500)
print("qed") I tried a ton of variations and found a few extra nuggets. I know the feature class and feature layer are correct. If I set the dataSource = source_fc, chart generates without error but i don't get the filter applied so it's not 'path to data kind of issue' If I export the layer to a table or lyrx it will also work but 'why do i have to add an extra step to write data back to disk'? If I add: print(r_chart_layer.getOutput(0).dataSource) It will print out the expected path to the feature class Oddly, this changes the failure, it's no longer an app crash but generates this error message: Traceback (most recent call last): File "D:\support\arcgis\chart-issues\create-chart.py", line 39, in <module> profile_chart.exportToSVG(chart_path, 500, 500) File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\charts.py", line 449, in exportToSVG svgRes = self.getSVG(width if width != None else self.displaySize[0], File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\charts.py", line 445, in getSVG return _convertArcObjectToPythonObject(self._arc_object.getSVG(width, height)) RuntimeError: Invalid dataset: CIMPATH=internal_map/pts.json There are work arounds but seems like you should be able to MakeFeatureLayer() and assign it as a chart data source without any extra steps.
... View more
03-09-2023
11:01 AM
|
0
|
1
|
789
|
|
POST
|
Hi @Anonymous User, Is there documentation on 'licensing' arcpro inside ArcGIS Server? I have an full ArcGIS Server Advanced license on this machine. What other license or setup is required? Also the script runs has expected when I execute it at the command line using the python env embedded in the ArcGIS server installation directory ... ArcPro app is not even running at that point so it doesn't seem like a licensing issue to me but possibily
... View more
01-11-2023
03:29 PM
|
0
|
0
|
855
|
|
POST
|
Hello All, We have a cool little geoprocessing analysis script that creates some data, does a bit of analysis and generates an awesome pdf 😉 .... this script works great when run from a desktop toolbox. When we publish it to server to connect to a web application, it fails at the point where we open the layout (pagx). There's no error message, the job just seems to die. Nothing in the AGS logs after a certain point when setting log level = debug. All the data and analysis artifacts (charts, csvs) get created fine -- i can inspect them in the AGS jobs folder. It's definitely in the final manipulation and export of the layout. We've done this before with ArcMap mxds and this is the first attempt with Pro aprx/pagx so maybe I'm just missing a crucial step in the process of opening the layout. I've distilled out all the fun data analysis and made a simple layout with a single text element for the title and a single map with only the stock basemap... no custom data, no fancy other elements... still dies in the same manner. I took out the map, so the layout has only a text element which the script/service will modify when run to ensure something is running dynamically and it works. So it seems like something with the map/map frame is the issue. Is there a 'activate' or 'update' map needed? Setup: ArcPro 2.9.5 / ArcGIS Server (standalone) 10.9.1 Here's the guts of the "run" method in the simplified script. Any thoughts would be greatly appreciated def ScriptTool(input_templates_folder, input_cool_text):
analysis_folder = arcpy.env.scratchFolder
map_template = os.path.join(input_templates_folder, 'Layout3.pagx')
arcpy.AddMessage('Template PAGX: {}'.format(map_template))
analysis_template = os.path.join(analysis_folder,'Layout3.pagx' )
arcpy.AddMessage('Analysis PAGX: {}'.format(analysis_template))
shutil.copyfile(map_template, analysis_template)
arcpy.AddMessage('Analysis PAGX: copied')
lyt = arcpy.mp.ConvertLayoutFileToLayout(analysis_template)
arcpy.AddMessage('Analysis PAGX: opened')
txt = lyt.listElements('TEXT_ELEMENT', 'Text')[0]
arcpy.AddMessage('Analysis PAGX: element found')
txt.text = input_cool_text
arcpy.AddMessage('Analysis PAGX: element updated')
layout_pdf = os.path.join(analysis_folder, "layout.pdf")
arcpy.AddMessage('Analysis PAGX: exporting to {}'.format(layout_pdf))
lyt.exportToPDF(layout_pdf)
arcpy.AddMessage('Analysis PAGX: complete')
return layout_pdf
... View more
01-10-2023
05:15 PM
|
0
|
2
|
900
|
|
POST
|
@ChristopherAllen Thanks for the verification. The 'aggregation=min' chart looks good when I use the full data. Looks like I was tinkering and had converted the values to integers to see if 'doubles' were the cause...this produced non-unique values and then the aggregation kicked in and made the chart a bit off.
... View more
01-10-2023
07:17 AM
|
1
|
2
|
1620
|
|
POST
|
@Anonymous User Thanks! The whole chart dataSource things is really odd... It works fine with a 'FeatureLayer' if you're running the code inside the ArcPro py window but standalone code with arcpy.MakeFeatureLayer doesn't work --- full on 'blow up' of the process. I did add the 'aggregation='min' on the constructor and got some sort of result but it was a bit off... I'm going to submit a bug on this and see what tech-support says. I'll report back on the findings.
... View more
01-06-2023
10:07 AM
|
0
|
0
|
1675
|
|
POST
|
Hi All, I must be missing something simple for a line chart. I have a simple csv file X,Y data ... values are doubles and I want to create a line chart but it blows up with the error: File "<stdin>", line 1, in <module> File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\charts.py", line 449, in exportToSVG svgRes = self.getSVG(width if width != None else self.displaySize[0], File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\charts.py", line 445, in getSVG return _convertArcObjectToPythonObject(self._arc_object.getSVG(width, height)) If I use the 'scatter' chart type, works fine but I don't get the nice line thru the data... so I don't think it's the data or csv format. ArcPro 3.0.2 CODE (running in a simple windows cmd window via C:\Users\fspataro\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone\python.exe): import arcpy
out_svg_file = r"T:\scratch\analysis2\test.svg"
temp_csv_file = r"T:\scratch\analysis2\test.csv"
c = arcpy.charts.Line(x='X', y='Y', dataSource=temp_csv_file)
c.exportToSVG(out_svg_file, width=400, height=400) DATA (save as test.csv): X,Y 0.00,8.32 3.27,8.66 6.54,9.06 9.81,9.44 13.08,9.86 16.35,10.38 19.62,11.02 22.89,11.74 26.17,12.67 Thanks!
... View more
01-05-2023
04:18 PM
|
0
|
9
|
1727
|
|
POST
|
Hi zain909, see my notes above. the default schema will ONLY be used if the incoming json doesn't have a 'fields' property. if the json has a fields, the service will correctly use them.
... View more
11-22-2022
09:06 AM
|
0
|
0
|
1468
|
|
POST
|
Thanks DEWright_CA. Yes been there done that, this appears to be more in the compiled tbx that's produced for the service rather than the python I can manipulate. The data/schema is already modify by the time the script receives it.
... View more
11-16-2022
03:44 PM
|
0
|
0
|
1483
|
|
POST
|
Tech support has verified the issue as bug in 2.0.1: BUG-000152141
... View more
11-15-2022
10:58 AM
|
1
|
0
|
900
|
|
POST
|
Bit of follow up... Wasn't able to find a way to make the service publish without a default schema using a single value input parameter. If you use a multi-value input parameter it appears to be less defined. However, the key to using the service either way is to make sure to include the 'fields' object on the FeatureSet json. When the fields object is included, your schema follows thru as you'd expect. If the fields object is NOT included in the json, then the 'default' schema is used --- which was what caused my original issue.
... View more
11-15-2022
10:55 AM
|
1
|
0
|
1487
|
|
POST
|
Hi All, I have a geoprocessing tool that will work on any featureset I provide it in the tool window. But when I publish the tool as service, the schema gets locked to the exact match of the features I used to run the tool for publishing. Then it's not at all generic for the needs of the service. Is there an 'empty schema' that can be used to run the tool for publishing or a way to tell the publisher to ignore the schema? Thanks Fred
... View more
11-11-2022
02:45 PM
|
0
|
5
|
1533
|
|
POST
|
HI, My script to update a content item data (file) fails when the item is in a folder. Seems like i might be missing something simple but can't figure out what. Setup: ArcGIS API for Python 2.0.1 Enterprise portal v 10.9.1 ... seems to work with AGOL Content item (tpk file) published/upload as simple file not as layer I can reproduce with the simple code below in the ArcPro python window Works fine if the item is in the owner root but fails when item is put into a folder Error:Traceback (most recent call last): File "<string>", line 1, in <module> File "D:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\__init__.py", line 12961, in update status = self._gis.content._add_by_part( File "D:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\__init__.py", line 5102, in _add_by_part path += "/" + folder_id TypeError: can only concatenate str (not "NoneType") to str Code: from arcgis.gis import GIS
gis = GIS('home')
id = '{item_guid_here}'
existing_tpk = gis.content.get(id)
tpk_path = r'C:\{my_new_awesome_file_here}.tpk'
existing_tpk.update(data=tpk_path)
... View more
08-29-2022
02:07 PM
|
0
|
1
|
1035
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-15-2024 10:18 AM | |
| 1 | 06-05-2025 08:06 AM | |
| 1 | 04-03-2024 08:47 AM | |
| 1 | 06-12-2018 03:16 PM | |
| 1 | 09-14-2023 01:54 PM |
| Online Status |
Offline
|
| Date Last Visited |
a month ago
|