|
BLOG
|
I prefer the custom toolboxes since you can screen grab the tool properties dialog. Gathering the text information is a bit of a drag, so I have included the script that allows you to do this easily and/or incorporate it into your own toolboxes. Start with a toolbox, its toolset(s) and tools. Here is a tool with its input parameter. This one is to document *.atbx toolboxes. The results of the tool are sent to the messages which can be copies to the clipboard and pasted in your text processor etcetera. Here is the sample output in a text processor. Now in custom toolboxes, you fill in the parameters in a dialog. You can follow the various options below Here is a sample tool. The general parameters are shown below. Code executation can be embedded or stored in a location relative to the toolbox itself. That can be in the same folder or in another folder relative to the toolbox. You can provide validation within the dialog, making it easier to keep your code less cluttered or if your validation is simple or non-existent. Similarly, you can specify an environment variables within the dialog. ============================ Now if I run the atbx info tool, you get the following results. atbx info
=====================
Tool Path
C:\arcpro_npg\arcpro_36\npg_36\npg_36.atbx\atbxInfo
=====================
Parameters
toolbox path C:\arcpro_npg\arcpro_36\npg_36\npg_36.atbx
=====================
Messages
Start Time: June 16, 2026 9:00:03 PM
--------
Running ... C:\arcpro_npg\arcpro_36\scripts_npg_36\atbx_info.py
--------
----
Toolbox : C:\arcpro_npg\arcpro_36\npg_36\npg_36.atbx
----
Property Value
------------------
alias npg36
--Tool Toolset
FeatureVerticesToPoints Featureclass tools
atbxInfo Toolbox properties
fcToGeo Featureclass tools
fcTonpz NumPy tools
npzTofc NumPy tools
Tools and Properties
--Tool : FeatureVerticesToPoints
--Toolset : Featureclass tools
type : ScriptTool
displayname : feature vertices to points
script_file : C:\arcpro_npg\arcpro_36\scripts_npg_36\feature_vertices_to_points.py
description : Convert poly* features to vertices.
product_code : 100
--Parameters
name : point_type
display name : point type
direction : Input
data type : String
parameter type : Required
enabled : True
category : None
symbology : None
multi-value : False
Tools and Properties
--Tool : atbxInfo
--Toolset : Toolbox properties
type : ScriptTool
displayname : atbx info
script_file : C:\arcpro_npg\arcpro_36\scripts_npg_36\atbx_info.py
description : acquire toolbox info
product_code : 100
--Parameters
name : toolbox_path
display name : toolbox path
direction : Input
data type : File
parameter type : Required
enabled : True
category : None
symbology : None
multi-value : False
Tools and Properties
--Tool : fcToGeo
--Toolset : Featureclass tools
type : ScriptTool
displayname : featureclass to Geo
script_file : C:\arcpro_npg\arcpro_36\scripts_npg_36\featureclass_to_Geo.py
description : Convert a featureclass to a Geo array.
product_code : 100
--Parameters
name : input_features
display name : input features
direction : Input
data type : Feature Layer
parameter type : Required
enabled : True
category : None
symbology : None
multi-value : False
Tools and Properties
--Tool : fcTonpz
--Toolset : NumPy tools
type : ScriptTool
displayname : featureclass to npz
script_file : C:\arcpro_npg\arcpro_36\scripts_npg_36\featureclass_to_npz.py
description : Convert a featureclass to a numpy *.npz file.
product_code : 100
--Parameters
name : npz_filename
display name : npz filename
direction : Input
data type : String
parameter type : Required
enabled : True
category : None
symbology : None
multi-value : False
Tools and Properties
--Tool : npzTofc
--Toolset : NumPy tools
type : ScriptTool
displayname : npz to featureclass
script_file : C:\arcpro_npg\arcpro_36\scripts_npg_36\npz_to_featureclass.py
description : Convert a numpy *.npz file to a featureclass.
product_code : 100
--Parameters
name : output_fc
display name : output featureclass
direction : Output
data type : Feature Class
parameter type : Required
enabled : True
category : None
symbology : None
multi-value : False
Succeeded at June 16, 2026 9:00:04 PM (Elapsed Time: 0.68 seconds) Here is the code # -*- coding: utf-8 -*-
"""
@author: dan_patterson
"""
import sys
import arcpy
from arcgisscripting._arcgisscripting import _utbx
pth_ = arcpy.GetParameterAsText(0) # the path to the toolbox
script = sys.argv[0] # print this should you need to locate the script
def toolbox_info(t_box):
"""Return toolbox information.
Parameters
----------
t_box : toolbox in *.atbx format
Example
-------
t_box = "C:/temp/npGeom_32.atbx"
"""
def _hdr_(hdr_n):
"""Format the header."""
return "{{:<{}s}}".format(hdr_n) + " {!s:<}"
t_box = t_box.replace("\\", "/")
t_props = _utbx.getToolboxProps(t_box, "*")
t_keys = sorted(list(t_props.keys()))
hdr_n = max([len(i) for i in t_keys])
frmt0 = _hdr_(hdr_n)
msg = frmt0.format("Property", "Value") + "\n" + ("-")*(hdr_n + 7)
z0 = ['name', 'display name', 'direction', 'data type', 'parameter type',
'enabled', 'category', 'symbology', 'multi-value']
keys0 = [i for i in t_keys if i != 'tools']
keys1 = 'tools' if 'tools' in t_keys else None
for k in keys0: # toolbox properties
v = t_props[k]
msg += "\n" + frmt0.format(k, v)
if keys1: # `tool` properties
v = t_props[keys1]
v_keys = sorted(list(v.keys()))
hdr_1 = max([len(i) for i in v_keys])
frmt1 = _hdr_(hdr_1)
msg += "\n" + frmt1.format("--Tool", " Toolset")
for k1 in v_keys:
v1 = v[k1]
msg += "\n " + frmt1.format(k1, v1)
for k1 in v_keys:
pth = "{}/{}".format(t_box, k1)
t_0 = _utbx.getToolProps(pth, '*')
tool_keys = list(t_0.keys())
msg += "\n\nTools and Properties"
msg += "\n--Tool : {!s:<}\n--Toolset : {!s:}\n".format(k1, v[k1])
for k2 in tool_keys:
if k2 != 'params':
msg += " {!s:} : {!s}\n".format(k2, t_0[k2])
elif k2 == 'params':
for i in t_0['params']:
z1 = [str(j) if j != '' else 'None'
for j in [i.name, i.displayName, i.direction,
i.datatype, i.parameterType, i.enabled,
i.category, i.symbology, i.multiValue]
]
msg += "--Parameters\n"
txt = "\n".join([" {!s:<} : {!s:}".format(*j)
for j in list(zip(z0, z1))])
# msg += "parameter"
msg += txt
else:
msg += "unknown"
return msg
# -------
msg = toolbox_info(pth_) # -- run
out_ = "\n--------\nRunning ... {}\n--------\n".format(script)
out_ += "\n----\nToolbox : {}\n----\n".format(pth_)
arcpy.AddMessage(out_)
arcpy.AddMessage(msg)
# ----------------------------------------------------------------------
# __main__ .... code section
if __name__ == "__main__":
# print the script source name.
print('\n{} in source script... {}'.format(__name__, script))
# parameters here So between screen grabs and the atbx info tool, your documentation is complete.
... View more
yesterday
|
0
|
0
|
104
|
|
POST
|
specify the file extension When storing a raster dataset in a geodatabase, do not add a file extension to the name of the raster dataset. When storing the raster dataset in a file format, specify the file extension as follows: Copy Raster (Data Management Tools) | ArcGIS Pro documentation
... View more
yesterday
|
1
|
0
|
85
|
|
POST
|
weird... even their example has a colored border (walkability example Histogram | ArcGIS Pro documentation It is like you need to "unselect" all histograms
... View more
Monday
|
0
|
1
|
174
|
|
POST
|
000594: Input feature <value>: <value>. | ArcGIS Pro documentation you aren't outputting to a shapefile are you? I would confirm
... View more
Wednesday
|
0
|
1
|
202
|
|
POST
|
As a precaution, in case it is a bug, you can always copy the results of any current run to the clipboard.
... View more
a week ago
|
0
|
1
|
353
|
|
POST
|
sounds like an issue with what you are using whatever MockValSer is. Tech Support would be your best bet, especially since you have the correct version of pydantic installed for your version of Pro. Perhaps other issues have been seen that are addressed in more recent versions of Pro. Good luck
... View more
a week ago
|
0
|
0
|
121
|
|
POST
|
2.4.2 according to the package release by version document arcpy/docs/ArcGIS-Pro-Python-Distribution-By-Release.pdf at main · Esri/arcpy
... View more
a week ago
|
0
|
2
|
166
|
|
POST
|
Perhaps, densify your road layer, then convert points (all vertces), then extract the raster information to those points. Extract Values to Points (Spatial Analyst Tools) | ArcGIS Pro documentation
... View more
2 weeks ago
|
0
|
0
|
212
|
|
IDEA
|
By default, online help is selected in the Project Backstage. The current version has a new offline help install. Prior versions of Pro had their own.
... View more
2 weeks ago
|
0
|
0
|
189
|
|
POST
|
progress at least, I thought it might be related to the roads or connections options (which I don't have any to use)
... View more
2 weeks ago
|
0
|
0
|
175
|
|
POST
|
perhaps it is some preceeding parameter or the version. Below is for SA and Pro 3.7 the parameter is blank, but I left other parameters empty and haven't experimented further. If it is/was a bug/issue I didn't see anything posted on the public facing support site.
... View more
2 weeks ago
|
0
|
2
|
186
|
|
POST
|
Cell assignment depends on the geometry being converted. Discussions are in the following links How Polygon To Raster works | ArcGIS Pro documentation How Point to Raster works | ArcGIS Pro documentation raster sampling by rasters would have to consider cell alignment and the snap raster Cell Alignment | ArcGIS Pro documentation Snap Raster | ArcGIS Pro documentation so I would be concerned if the rasters are misaligned
... View more
2 weeks ago
|
0
|
0
|
135
|
|
POST
|
One Drive and the like are still a ways off for complete integration with Pro (near term column) ArcGIS Pro Roadmap - May 2026 So other than providing a static backup of your work, there are still many threads about avoiding its use for active data access. Local storage and processing is always the best unless you have multiple people that have to edit/add data at the same time.
... View more
2 weeks ago
|
1
|
0
|
194
|
|
POST
|
Can you provide a reference whereby "average distance between two random points within a polygon" is going to give rise to a compactness measure when there other measures which are easy to calculate? Compactness measure - Wikipedia
... View more
2 weeks ago
|
0
|
0
|
376
|
|
POST
|
Integrate (Data Management Tools) | ArcGIS Pro documentation to quote the 3.7 help files... It is recommended that you do not provide a value for the XY Tolerance parameter. When no value is provided, the tool will check the input feature classes' spatial reference to determine the x,y tolerance to use during integration. Ensure that the spatial reference of the input data is set to its default x,y resolution and x,y tolerance. Where they then say The XY Tolerance parameter is not intended to be used to generalize geometry shapes. It is intended to integrate line work and boundaries within the context of a properly set input feature class spatial reference. Setting the XY Tolerance parameter to a value other than the default for the input spatial reference may cause features to move too much or too little, resulting in geometry issues. If the correct spatial reference properties are used, running the Integrate tool can minimize the amount of movement in the data during subsequent topological operations (such as overlay and dissolve). So perhaps it is the potential for geometry errors
... View more
2 weeks ago
|
1
|
0
|
324
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | yesterday | |
| 1 | 02-26-2025 04:26 AM | |
| 1 | 02-26-2025 07:49 AM | |
| 1 | 2 weeks ago | |
| 1 | 2 weeks ago |