POST
|
I had this problem if I was writing any data to the SAN, accessing data on, or writing data to, the SAN (shapefiles, File GDB, .loc files, any package files, and even .sde connection files). I'm working around the problem and probably won't visit again until we upgrade to 3.0. I posted here to see if anyone else experienced this or if maybe someone at Esri had thoughts.
... View more
08-03-2023
10:55 AM
|
0
|
0
|
480
|
POST
|
Last autumn we deployed a new SAN at our org. Ever since then any of my Python utilizing acrpy that writes to, or references, a directory on that SAN using the complete UNC path (//SAN/DIRECTORY/SUB-DIRECTORY/SUB-SUB-DDIRECTORY/ etc.) runs exceptionally slow. However, if I use the drive letter for the path it runs at normal speeds. And when I say slow, I mean when it would normally take a minute or two it now takes an hour or more. And it seems to be limited to the arcpy module. Below are some run times using UNC/drive letter and shutil/arcpy. The shell utilities module is used to copy a directory with shapefile files in it to the SAN. Arcpy is used to export a featureclass to a shapefile in a directory on the SAN. Drive Letter and shutil: 0.4070 mins UNC and shutil: 0.400 mins Drive Letter and arcpy: 0.150 mins UNC and arcpy: 103.14 mins Most of this involves my data management Python that runs on a server. I've rewritten it so arcpy doesn't reference or write anything on the SAN. I just works with the local hard drive. I then use other Python libraries to move, and work with, data on the SAN. Anyone else experience this? If I had to guess it has something to do with the config of the new SAN.
... View more
08-02-2023
05:14 AM
|
1
|
2
|
528
|
POST
|
Will versioned editing (non branch) be supported in ArcMap? I have one user performing edits in ArcMap that will take a month or two for me to get her production editing setup in ArcGIS Pro completed. It would be nice to migrate from GN to Trace Network then work on my users tools while she continues using ArcMap in the time being.
... View more
07-16-2020
08:02 AM
|
0
|
2
|
516
|
POST
|
I was thinking along the lines of what we are capable with the ArcGIS API for Javascript, synchronized between map and charts. No worries, I've moved to developing my own app/dashboard.
... View more
05-08-2020
08:09 AM
|
1
|
1
|
1758
|
POST
|
Oh, dear... Robert, I'm such an idiot. It's 'outFields' not 'outfields'. I went to AJAX and it was working because i was using outFields A typo will be the death of me someday. I apologize for taking up your time. *places dunce developer hat upon head and heads to the corner*
... View more
12-18-2019
07:05 AM
|
1
|
0
|
1648
|
POST
|
Still only returns TAGNAME field. ["geometry":null,"symbol":null,"attributes":{"TAGNAME":"ADAMS.AF2295LQT.F_CV"},"popupTemplate":null},{"geometry":null,"symbol":null,"attributes":{"TAGNAME":"ADAMS.AS1941CAT.F_CV"},"popupTemplate":null},{"geometry":null,"symbol":null,"attributes":{"TAGNAME":"ADAMS.AS1941LQT.F_CV"},"popupTemplate":null},{"geometry":null,"symbol":null,"attributes":{"TAGNAME":"ADAMS.CAB2295LQT.F_CV"},"popupTemplate":null},{"geometry":null,"symbol":null,"attributes":{"TAGNAME":"ADAMS.CR1941CAT.F_CV"},"popupTemplate":null},{"geometry":null,"symbol":null,"attributes":{"TAGNAME":"ADAMS.CR1941LQT.F_CV"},"popupTemplate":null},{"geometry":null,"symbol":null,"attributes":{"TAGNAME":"ADAMS.CV1942CAT.F_CV"},"popupTemplate":null},{"geometry":null,"symbol":null,"attributes":{"TAGNAME":"ADAMS.HR1942CAT.F_CV"},"popupTemplate":null},{"geometry":null,"symbol":null,"attributes":{"TAGNAME":"ADAMS.JR1941CAT.F_CV"},"popupTemplate":null},{"geometry":null,"symbol":null,"attributes":{"TAGNAME":"ADAMS.LA1941CAT.F_CV"},"popupTemplate":null},{"geometry":null,"symbol":null,"attributes":{"TAGNAME":"ADAMS.LA1941LQT.F_CV"},"popupTemplate":null},{"geometry":null,"symbol":null,"attributes":{"TAGNAME":"ADAMS.LF1941CAT.F_CV"},"popupTemplate":null},{"geometry":null,"symbol":null,"attributes":{"TAGNAME":"ADAMS.LF1941LQT.F_CV"},"popupTemplate":null},{"geometry":null,"symbol":null,"attributes":{"TAGNAME":"ADAMS.LM1941CAT.F_CV"},"popupTemplate":null},{"geometry":null,"symbol":null,"attributes":{"TAGNAME":"ADAMS.LM1941LQT.F_CV"},"popupTemplate":null},{"geometry":null,"symbol":null,"attributes":{"TAGNAME":"ADAMS.RR1942CAT.F_CV"},"popupTemplate":null},{"geometry":null,"symbol":null,"attributes":{"TAGNAME":"ADAMS.RR1942LQT.F_CV"},"popupTemplate":null},{"geometry":null,"symbol":null,"attributes":{"TAGNAME":"ADAMS.SE1942CAT.F_CV"},"popupTemplate":null},{"geometry":null,"symbol":null,"attributes":{"TAGNAME":"ADAMS.SE1942LQT.F_CV"},"popupTemplate":null},{"geometry":null,"symbol":null,"attributes":{"TAGNAME":"FOURCHE.FC2295LQT.F_CV"},"popupTemplate":null},{"geometry":null,"symbol":null,"attributes":{"TAGNAME":"MAUMELLE.LM1941CAT.F_CV"},"popupTemplate":null}]{
... View more
12-18-2019
06:14 AM
|
0
|
2
|
1648
|
POST
|
When you declare your rainAmtTbl do you specify the outFields parameter? If you do not then only fields that are used in the renderer will be returned along with ObjectID and Shape fields. Originally I didn't, but I added it and get the same result. Also, this is a GDB table, not a featureclass. So no geometry fields. Maybe this is the problem? const rainAmtTbl = new FeatureLayer ({ url:'https://gis.lrwu.com/server/rest/services/RainGauges/Rain_Gauges/FeatureServer/2', outFields: ['*'] }); So is that a parameterized query in an enterprise database? If not then the where clause looks strange. I'm using template strings. Just a different formatting option. It's the same as "TAGNAME = '" + tag + "'" query.where = `TAGNAME = '${tag}'`; 3. Or are you using jQuery in your app? No jQuery. I hate to say this but at one point the result included all the fields but I can't remember what I did in that instance. I might have been attempting to go through the related featureclass. In that instance I tried parsing the json but that didn't work. For the most part I have working with queryFeatures or using a QueryTask. I pretty much get the same results.
... View more
12-18-2019
05:44 AM
|
0
|
4
|
1648
|
POST
|
I have a table in the map (rainAmtTbl). I'm trying to create a function that will query a table where field `TAGNAME = '${tag}'` -- param. The only field (and attribute) i'm concerned with beyond the where clause is the 'VALUE' for that tag. I want the function to return the VALUE attribute so I can plug it into a chart. The result of that promise only returns "TAGNAME": "ADAMS.AF2295LQT.F_CV" and not the attribute for the VALUE field for that row. What am I missing? // TODO: getRainValue Function
function getRainValue(tag){
let query = new Query();
query.outfields = ['*'];
query.where = `TAGNAME = '${tag}'`;
query.returnDistinctValues = true;
rainAmtTbl.queryFeatures(query)
.then((response)=> {
console.log(response.features);
console.log(JSON.stringify(response.features[0].attributes));
})
.catch((error) => {
console.log(error)
});
... View more
12-17-2019
01:20 PM
|
0
|
6
|
1864
|
POST
|
Here's what is happening: The SelectLayerByLocation_management function is using the subbasin layer— before the definition query is applied— as the selecting features input. Whatever definition query is applied to the subbasin layer when the project is opened is the one used for the spatial selection. Even though I get the correct layer object and use it as a parameter in the selection (line 33). In the image below there was no definition query applied to the subbasin layer before the tool ran, so the selecting features were all the subbasins. I even had the tool sleep for 30 sec (line 30) while I manually refreshed the map to no effect (BTW, there is no refresh method in the Map class of the mp module). Next step is to export the layer with the definition query applied then use that output as the selecting features in the spatial selection. EDIT: CopyFeatures_management does the same thing as SelectLayerByLocation_management This is only an issue when run as a GP tool. No issue in the python console. Sure would be nice if someone from Esri would comment on this... import arcpy
from arcpy import env
import time
# Global variables
# ----------------
aprx = arcpy.mp.ArcGISProject('CURRENT')
myMap = aprx.listMaps('Map')[0]
sbCode = arcpy.GetParameterAsText(0)
sbAIName = f'Subbasin {sbCode}'
sbDefQ = f'AREA_CODE = {sbCode}'
# Get the layer objects
mshLayer = myMap.listLayers('Mapsheets')[0]
mshAILayer = myMap.listLayers('AI Mapsheets')[0]
aiResultLayer = myMap.listLayers('AI Results')[0]
sbAILayer = myMap.listLayers('Subbasin *')
myMap.clearSelection()
for sb in sbAILayer:
arcpy.AddMessage(f'Layer name start of loop: {sb}')
arcpy.AddMessage(f'Subbasin query string: {sbDefQ}')
sb.definitionQuery = sbDefQ
arcpy.AddMessage('Definition query applied to AI Subbasins.')
sb.name = sbAIName
arcpy.AddMessage(f'AI Subbasin layer name changed to {sbAIName}')
arcpy.AddMessage(f'Layer name end of loop: {sb}')
arcpy.AddMessage('Sleeping for 30 seconds...')
time.sleep(30) # Manually refresh the map during sleep
# Layer object again to ensure I have the correct one for selecting feature below
sbSelection = myMap.listLayers(sbAIName)[0]
# Perform spatial selections
# --------------------------
# Select Acoustic Inspection results in desired subbasin
resultsSelect = arcpy.SelectLayerByLocation_management(aiResultLayer,
'WITHIN',
sbSelection,
0,
'NEW_SELECTION')
arcpy.AddMessage(resultsSelect)
... View more
09-25-2019
05:41 AM
|
0
|
1
|
1421
|
POST
|
That's the problem...There were no selections. The selections are cleared each time. And I'm deleting the display cache. I may try rebuilding the project from scratch.
... View more
09-24-2019
11:47 AM
|
0
|
0
|
1421
|
POST
|
I tested everything in the Python console before I moved it to the script tool. So the first time it ran as a script tool the mapsheets/grid selection was same as the previous run in the console—not the desired result. I created a new project, imported the maps and layouts, and created another script tool and the result is the same. The mapsheet/grid selection result is what was desired in the last run in the other project.
... View more
09-24-2019
11:17 AM
|
0
|
2
|
1421
|
POST
|
I gave the layers completely unique names as a quick test and the result is the same. I think I may just rebuild it as an ArcGIS Pro add-in.
... View more
09-24-2019
05:09 AM
|
0
|
0
|
1421
|
POST
|
I have an old script tool that I'm migrating to ArcGIS Pro. The tool only has two parameters (Subbasin: string, Directory: folder) and it is supposed export a PDF mapbook of the features for the subbasin number entered. I wrote the code and tested it in the Python console window in Pro. It works fine. I have exported >20 mapbooks. I configured it as a script tool and two things happen: Whatever subbasin is entered, the resulting section set for mapsheets is always the selection set that was desired on the previous run of the tool—seriously weird! The PDF export file is never created. The exportToPDF function seems to run, but no file is generated and no exception is thrown. The logic is as follows: Check the map for the required layers Apply the definition query for the desired subbasin Perform selections to get the desired mapsheet grid Select inspection results for the desired subbasin Select mapsheets for previously selected inspection results Apply definition query to based on mapsheet selection Get selection set for mapsheet Use selection set to make query string for definition query. Apply definition query to Inspection Mapsheets layer Change Layout text elements Refresh map series Export map series as PDF I added the mapbook derived output the last time i tried to get it to work.
... View more
09-23-2019
07:12 AM
|
0
|
8
|
1653
|
Title | Kudos | Posted |
---|---|---|
1 | 08-02-2023 05:14 AM | |
1 | 09-07-2018 11:34 AM | |
1 | 05-17-2018 07:47 AM | |
1 | 10-16-2018 10:04 AM | |
2 | 02-22-2019 05:24 AM |
Online Status |
Offline
|
Date Last Visited |
08-08-2023
04:10 PM
|