|
POST
|
You could use either the tabulate intersection tool, which will tabulate every instance of the coinciding lines that are within a grid polygon layer. If using python: Set the script to utilize the tabulate intersection tool Run the search cursor on the tabulate intersection table to append values to a list Run another search cursor to identify the ones that are not within that list (list comprehension may work best for this situation if looking to simplify your code) That would help you identify the ones that are outside of the grid. If using ModelBuilder: Similar process but requires using the iterators and if statements.
... View more
10-27-2021
05:35 AM
|
0
|
0
|
2943
|
|
IDEA
|
I think that it would be a huge help if attribute rules could be instilled with the option for a check box to update using 'Real Time'. Meaning that if that option is checked, regardless of the feature being published or not, that the feature would update based on real time. It seems rather strange that only a few triggers exist currently for attribute rules (Insert, Update, Delete), but having the option of selecting real time would be extremely helpful.
... View more
10-26-2021
09:48 AM
|
1
|
0
|
1291
|
|
IDEA
|
Hi, I have noticed that, in the web maps, that users can create custom fields based on arcade expressions which shows as temporary field(s). However, those fields are only shown in the web map and cannot be used for setting a filter on the layer. It would be very helpful if a temporary field can be added that updates attributes in real time and be able to filter based on that attribute value. Another option would also be for hosted feature services to have the ability to have fields created, based on an arcade expression, and used in the web map with full functionality. If this already exists and I simply overlooked it, please let me know. Otherwise, I hope that this is something that can be implemented because it can be used for a multitude of the projects that I work on.
... View more
10-25-2021
12:43 PM
|
4
|
0
|
1118
|
|
IDEA
|
Hi, I have a custom solution, designed using WAB in ArcGIS Online, which utilizes the Query Widget. I noticed that there isn't an option in the widget settings that allows for a predefined spatial relation in the widget. For what I am trying to do, it would be really helpful if a spatial relation could be set for when the users utilize the widget.
... View more
10-21-2021
11:18 AM
|
1
|
0
|
598
|
|
POST
|
hi @Luke_Pinner, I was simply asking out of curiosity. I wasn't necessarily planning on going in that direction without checking with someone who is more knowledgeable than I. I am glad that the documentation that you provided outlined the different setups in regards to namespaces. I am relatively new to scripting functions and classes, so I do not have quite a strong grasp of such concepts. I will have to do some more research to figure out which direction would be best to take as well as experiment to see how script will behave. There is still a lot of material in regards to all of the intricacies and functionalities of python as it pertains to GIS. I am still trying to learn what is best practice and I check with the community frequently when I don't fully understand something.
... View more
10-19-2021
07:05 AM
|
0
|
0
|
8033
|
|
POST
|
Ok so, if I understand this correctly, is that a script and module are technically one in the same and that nesting multiple modules is not possible. However, nesting multiple classes is possible. Here is what I was originally thinking. def sample(a):
b = a
return b
def example(c):
c = l
# do something
return c If something like this isn't necessarily proper, but setting these to classes instead of modules is then I will give that a try. I was trying to figure out the best approach since I am trying to create a custom tool(s) for my department to utilize in the web. So far, the tool seems to work perfectly without nesting anything additional, but I was simply curious is all.
... View more
10-18-2021
09:03 AM
|
0
|
2
|
8043
|
|
POST
|
Hi, Just a simple question, is it possible to have multiple python modules nested within a python module? I am working on a script tool and I was thinking of nesting multiple modules within a module, but I just wanted to check to see if this is either frowned upon when it comes to scripting or if there is some other reason not to do it.
... View more
10-15-2021
08:30 AM
|
0
|
6
|
8125
|
|
POST
|
Hi @DonMorrison1, What you provided is definitely close to what I am after. Essentially, if the user selects one of the values from the list, the corresponding code will run.
... View more
10-15-2021
07:06 AM
|
1
|
0
|
1360
|
|
POST
|
Hi @DonMorrison1, So not quite what I am trying to accomplish but relatively close. What I am trying to accomplish is when the user selects certain values, any remaining values in the list are removed. These values dictate which parts of the main script get executed and which parts are passed. Essentially it is designed so that, depending on the selected values, certain databases are searched through and certain data gets extracted.
... View more
10-14-2021
04:29 AM
|
0
|
0
|
1361
|
|
POST
|
Thanks @DonMorrison1, Just to clarify, if I poorly did so, is that the values I am trying to enable users to select are to designate which sets of data to extract. This tool is designed to loop through our databases, extract the feature classes needed, and zip the folders. I will give you example a try and tweak it as needed. I haven't done anything like that so this will be new to me.
... View more
10-12-2021
07:28 AM
|
0
|
0
|
1365
|
|
POST
|
Hi @Anonymous User, I tried your suggestion but the tool either raised an error or there were no values to select. There is another work around that I have thought about that I could give a try. That workaround involving multiple parameters with yes or no values. But I am hoping there is an option for ensuring that only remaining values remain when a value is selected from a list of values.
... View more
10-11-2021
10:29 AM
|
0
|
0
|
5234
|
|
POST
|
Here is what I have thus far. I can easily configure everything else for when the script runs, but I am trying to setup some limitations so that the end user doesn't continuous select information and/or duplicate information. Figuring out how to set limitations based on available values is something that seems easier said than done. I thought, perhaps, to even use a table of values and set each value to only a unique selectable value. # -*- coding: utf-8 -*-
import arcpy
import sys
import os
class Toolbox(object):
def __init__(self):
"""Define the toolbox (the name of the toolbox is the name of the
.pyt file)."""
self.label = "Toolbox"
self.alias = "toolbox"
# List of tool classes associated with this toolbox
self.tools = [Tool]
class Tool(object):
def __init__(self):
"""Define the tool (tool name is the name of the class)."""
self.label = "Tool"
self.description = ""
self.canRunInBackground = False
def getParameterInfo(self):
"""Define parameter definitions"""
Select_Folder = arcpy.Parameter(
displayName = "Select Output Folder",
name = "Output_Folder",
datatype = "DEType",
parameterType = "Required",
direction = "Input")
Grid_Index = arcpy.Parameter(
displayName = "Input Grids Feature",
name = "TileIndex",
datatype = "DEFeatureClass",
parameterType = "Required",
direction = "Input")
Select_Grids = arcpy.Parameter(
displayName = "Select Grids",
name = "Select_Grids",
datatype = "GPString",
parameterType = "Required",
direction = "Input",
multiValue = True)
Select_DataExport = arcpy.Parameter(
displayName = "Select Data To Export",
name = "Select_DataExport",
datatype = "GPString",
parameterType = "Required",
direction = "Input",
multiValue = True)
Select_WaterSewerDatabases = arcpy.Parameter(
displayName="Input Databases (Water & Sewer)",
name = "Select_Databases",
datatype = "DEType",
parameterType = "Optional",
direction = "Input",
enabled = False)
Select_StormwaterDatabases = arcpy.Parameter(
displayName="Input Databases (Stormwater)",
name = "Select_Databases",
datatype = "DEType",
parameterType = "Optional",
direction = "Input",
enabled = False)
LidarGridsFolder = arcpy.Parameter(
displayName = "Lidar Grids Folder",
name = "LidarTilesFolder",
datatype = "DEType",
parameterType = "Optional",
direction ="Input",
enabled = False)
LidarGrids = arcpy.Parameter(
displayName = "Input Lidar Grids",
name = "LidarTiles",
datatype = "DEType",
parameterType = "Optional",
direction = "Input",
enabled = False)
parameters = [Select_Folder, Grid_Index, Select_Grids, Select_DataExport, Select_WaterSewerDatabases, Select_StormwaterDatabases, LidarGridsFolder, LidarGrids]
return parameters
def isLicensed(self):
"""Set whether tool is licensed to execute."""
return True
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 parameter 2 values from list generated from parameter 1 input
feature_class = parameters[1].value
TileNumber_field = [field.name for field in arcpy.ListFields(feature_class) if field.name == 'TILE_NUMBER']
scur = arcpy.da.SearchCursor(feature_class, TileNumber_field)
parameters[2].filter.list = [row[0] for row in scur]
Export_values = ['Water', 'Sewer', 'Stormwater', 'Lidar']
parameters[3].filter.list = Export_values
# Update either parameter 4, 5, 6, 7 depending on parameter 3 value
if parameters[3].valueAsText is None:
pass
elif parameters[3].valueAsText in Export_values[:2]:
parameters[4].enabled = True
if parameters[6].enabled:
parameters[7].enabled = True
return
def updateMessages(self, parameters):
"""Modify the messages created by internal validation for each tool
parameter. This method is called after internal validation."""
return
def execute(self, parameters, messages):
"""The source code of the tool."""
## # Input parameters for tool processing
## folder_path = parameters[0].valueAsText
## Grids = parameters[2].valueAsText
## Water_Sewer_Databases = parameters[4].valueAsText
## Stormwater_Databases = parameters[5].valueAsText
## LidarFolder = parameters[6].valueAsText
##
## # Values for intermediate processing or outputs
## new_folder = ''
## Export_GDB = ''
##
## namefolder = os.path.join(folder_path, 'DataExportFolder')
## Export_GDB_name = os.path.join(new_folder, 'Export')
##
## for root, directories, files in os.walk(folder_path):
## if os.path.exists(namefolder) == True:
## new_folder = namefolder
## else:
## new_folder = os.mkdir(namefolder)
##
## for root, directory, file in os.walk(new_folder):
## if Project in os.path.join(root, file):
## pass
## else:
## Export_GDB = arcpy.management.CreateFileGDB(new_folder, Export_GDB_name)
return
... View more
10-11-2021
10:12 AM
|
0
|
0
|
5237
|
|
POST
|
Hi @DonMorrison1, When I select a single value, then the error would arise. However, if I were to select two values, the error wouldn't arise despite multiple selected values. I managed to set it and get the behavior to change so the error wouldn't persist but it was only occurring if multiple values were selected.
... View more
10-11-2021
04:03 AM
|
0
|
0
|
5244
|
|
POST
|
I don't have a default nor do I have any filter of the parameter. I haven't tried setting the filter but I guess I could give that a try. I will let you know if I end up with the same result. Here is the actual error that I keep getting whenever a value is selected (i.e. Water). ERROR 000800 The value is not a member of Sewer | Stormwater | Lidar.
... View more
10-08-2021
11:22 AM
|
0
|
2
|
5278
|
|
POST
|
Hi, I am working on a custom script tool where the update parameters automatically adjust a list of selectable values. Every time the user selects a value, it is removed from the list of values and returns whichever values remain. This is set up so that either not too many values are selected or a repeat of values is selected. It works, but then this error message appears. Any help on this would be greatly appreciated. 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 parameter 2 values from list generated from parameter 1 input
feature_class = parameters[1].value
TileNumber_field = [field.name for field in arcpy.ListFields(feature_class) if field.name == 'TILE_NUMBER']
scur = arcpy.da.SearchCursor(feature_class, TileNumber_field)
parameters[2].filter.list = [row[0] for row in scur]
Export_values = ['Water', 'Sewer', 'Stormwater', 'Lidar']
Sub_ListValues = []
# Update parameter 3 value list
Selected_value = parameters[3].valueAsText
if Selected_value is None:
parameters[3].filter.list = Export_values
else:
if ';' not in Selected_value:
parameters[3].filter.list = [value for value in Export_values if value != Selected_value]
elif ';' in Selected_value:
converted_str2list = Selected_value.split(';')
parameters[3].filter.list = [value for value in Export_values if value not in converted_str2list]
return
... View more
10-08-2021
09:17 AM
|
0
|
13
|
6703
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-07-2026 01:36 PM | |
| 1 | 02-10-2026 06:09 AM | |
| 1 | 03-04-2026 01:08 PM | |
| 1 | 02-24-2026 12:59 PM | |
| 3 | 03-03-2026 10:33 AM |
| Online Status |
Offline
|
| Date Last Visited |
Monday
|