POST
|
Thanks Dan for this. I realize that my question was not as clear and simple as I thought. I fact, I am trying to set my Statistics Fields parameter as a list of values where the user can add new values using the 'Add Value' Button. When the data type is defined as String I can set the property Filter as Value List and add default values. I don't need to set the data type as Field because the values are not obtained from fields. Moreover, the available functionality is 'Add Field'. Similar but potentially misleading for the user How do I enable this 'Add Value' button or what is the proper way to customize this intended behavior?
... View more
01-05-2018
09:17 AM
|
0
|
1
|
436
|
POST
|
I am building a script tool with a parameter 'Statistics Fields'. properties as set as follow: How do I enable the 'Add Value' button associated to this parameter? Thanks
... View more
01-04-2018
03:14 PM
|
0
|
3
|
579
|
POST
|
Hi, I would like to reproduce and enhance the behavior of the Summary Statistics tool in my own tool. Currently, the summary statistics tool provides the same choices in the statistic type drop down list regardless of the field type but throws a 000315 warning message when the selection is in contradiction with the field type (i.e. valid statistics for text field are min, max, count,, etc...). I had high expectations when I found Duncan Hornby's article, but he did not address what I am looking for. So a couple of questions: - Can this behavior be enhanced in the way that the drop down list updates according to the field type instead of throwing an error message? - I suspect the def updateParameters(self) of the validation is where everything happens but I am having a hard to figure it out. Has someone done something similar? Cheers
... View more
12-05-2017
10:59 AM
|
0
|
1
|
527
|
DOC
|
Hi Duncan, Great document here, thanks for sharing. For debugging purposes, you could use the arcpy.AddMessage function to get direct feedback in the arcpy console once you hit the OK button (?) , for example reading values from parameters def execute(self, parameters, messages):
"""Execute the source code of the tool."""
fields = parameters[2].values
arcpy.AddMessage(fields)
return
... View more
11-28-2017
11:11 AM
|
0
|
0
|
3580
|
DOC
|
def updateParameters(self, parameters):
"""Modify the values and properties of parameters before internal
validation is performed. This method is called whenever a parameter
has been changed."""
# Update drop down for second column. Logic is that the last entry in
# the value table is the one you want to select a field ID for.
if parameters[2].altered:
# Return a list of lists
lol = parameters[2].values
# now update filter to list only the fields for the FeatureLayer in the last row.
lay = lol[-1][0] # capture layer portion of the parameter in last row
fi = lol[-1][1]
fields = arcpy.ListFields(lay)
# using list comprehension
parameters[2].filters[1].list = [field.name for field in fields if field.type in ["Integer","OID"] ] return Python technicalities but looks cleaner
... View more
11-28-2017
11:11 AM
|
0
|
0
|
3580
|
POST
|
I did uninstall and reinstall ArcGIS Pro after manually deleting the ..\ArcGIS\Pro\bin\Python\envs\arcgispro-py3 folder.
... View more
07-07-2017
10:52 AM
|
1
|
0
|
831
|
POST
|
Thanks Robert, After reinstalling the tool works properly.
... View more
07-06-2017
03:29 PM
|
0
|
3
|
831
|
POST
|
Hi, I am working the Analyzing traffic accidents in space and time case study and trying to run the Create Space time tool. This is the error message I get: By curiosity, I followed the Traceback and I see all modules are there. Am I missing something? My sys specs: ArcGIS Pro 2.0 Windows 7 6.1.7601 SP1 i5/4570 CPU@3.20GHz python 2.7.5 default python 2.7.13 and 3.6.1 installed in conda/envs
... View more
07-06-2017
02:21 PM
|
0
|
7
|
1188
|
POST
|
Well, thank you all for your feedback. I understand that I'll have to observe some best practices for messaging and/or logging. However, the issue I described is a reproducible one since for each run it happens at the same line number. I also noted that when clicking in the console window, line count information gets refreshed... I am not that concerned.
... View more
07-06-2017
01:46 PM
|
0
|
0
|
1027
|
POST
|
No issue with my script as it is running fine but just for my information (or making sure my system is not giving up on me...), is there a known limitation with arcpy.AddMessage not automatically updating the tool dialog box after ~65500 rows? However, one can still see the vertical scrollbar update its position upward as new lines are 'added' to the console.
... View more
06-19-2017
08:53 AM
|
0
|
5
|
1510
|
POST
|
Hi Bruce I am not sure how you would call this functionality in AGOL, but the following shows what I'm talking about. Although ArcGIS Pro offers to 'add data from path/URL', the functionality fails to add csv files from web URLs. Thanks for suggesting to post the scenario in ArcGIS Ideas. However, I'll wait for the next releases of Desktop and Pro and go from there. In the meantime, I'll keep download my CSV from the web and add it in Pro. Regards
... View more
06-06-2017
08:34 AM
|
1
|
0
|
1625
|
POST
|
Thanks Joshua. I know now that I have not overthought it. It would be conveniently great to have the ArcGIS Online way implemented in ArcGIS Pro then.
... View more
06-05-2017
08:06 AM
|
0
|
0
|
1625
|
POST
|
AGO is very good at 'adding layer from the web' for a csv file provided the URL path. But is there the equivalent in ArcGIS Pro? I cannot figure it out. Thanks.
... View more
06-01-2017
02:45 PM
|
2
|
6
|
3291
|
Title | Kudos | Posted |
---|---|---|
1 | 06-06-2017 08:34 AM | |
1 | 07-07-2017 10:52 AM | |
2 | 06-01-2017 02:45 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|