Select to view content in your preferred language

Consistent path and filename parameters in GP tools

649
5
03-21-2023 01:47 PM
Status: Open
Labels (1)
Bud
by
Honored Contributor

Edit: ArcGIS Pro 2.6.8


If I understand correctly:

Some geoprocessing tools have separate parameters for the path and filename. Other GP tools have a single parameter for the path and filename combined.

That seems inconsistent. When I'm in a hurry, I often assume a tool uses one convention, but it actually uses the other. So the value I entered is incorrect, causing frustration.

For example, Spatial Join has the path and filename combined into a single parameter: "Output Feature Class".

Bud_3-1679431473755.png

Whereas the Export Features tool splits the path and filename into separate parameters: "Output Location" and "Output Name".

Bud_2-1679431124967.png

I wonder if more consistency in this area would make it easier for new GIS users to pick up ArcGIS Pro, rather than fiddling with the output parameters.

Feel free to let me know if I've missed something.

 

5 Comments
BarryNorthey

AGP works with the notion of a workspace and base name, often displaying just the base name to make things "fit" the display and easier to adjust.

Under Options --> Application

BarryNorthey_1-1679501683114.png

Display data paths as shortened names

This option controls whether geoprocessing tool parameters that contain a dataset path are displayed as a shortened name.

  • Checked—Dataset paths are displayed as a shortened name, and you can click the shortened name to see the full dataset path. This is the default.
  • Unchecked—Full dataset paths are always displayed.

As for your lower screen shot, I am not sure if this is a version thing as my 3.1.0 shows this :

BarryNorthey_3-1679502134187.png

 

 

DanPatterson

edit

Bud
by

@BarryNorthey Thanks for the info. That helps.

Yeah, my screenshots came from ArcGIS Pro 2.6.8. So I guess the Export Features parameters have changed since then.

I checked 3.1 too, and the parameter is like you described: Output Feature Class.

Bud_0-1679545719325.png


For what it's worth, here's a list of GP tools that have  output_location  or  output_name  parameters in ArcGIS Pro 3.1. Most of them are geoanalytics tools. But some are from other toolboxes too.

for tool in arcpy.ListTools("*"):
    params = arcpy.GetParameterInfo(tool)
    for param in params:
        if param.name == "output_location" or param.name == "output_name":
            print(tool, param.name)
AggregatePoints_geoanalytics output_name
CalculateDensity_geoanalytics output_name
CalculateField_geoanalytics output_name
CalculateMotionStatistics_geoanalytics output_name
ClipLayer_geoanalytics output_name
CopyToDataStore_geoanalytics output_name
CopyTraversedSourceFeatures_na output_location
CreateBuffers_geoanalytics output_name
CreateReplicaFromServer_management output_name
CreateSpaceTimeCube_geoanalytics output_name
DescribeDataset_geoanalytics output_name
DetectIncidents_geoanalytics output_name
DissolveBoundaries_geoanalytics output_name
ExportS101Cell_maritime output_location
FeatureClassZToASCII_3d output_location
FindDwellLocations_geoanalytics output_name
FindHotSpots_geoanalytics output_name
FindPointClusters_geoanalytics output_name
FindSimilarLocations_geoanalytics output_name
GenerateProductLayout_topographic output_location
GeocodeFile_geocoding output_location
GeocodeFile_geocoding output_name
GeocodeLocationsFromTable_geocoding output_name
GroupByProximity_geoanalytics output_name
IterateLayers_mb output_name
JoinFeatures_geoanalytics output_name
MergeLayers_geoanalytics output_name
MosaicToNewRaster_management output_location
OverlayLayers_geoanalytics output_name
ReconstructTracks_geoanalytics output_name
RecoverFileGDB_management output_location
SnapTracks_geoanalytics output_name
SummarizeAttributes_geoanalytics output_name
SummarizeCenterAndDispersion_geoanalytics output_name
SummarizeWithin_geoanalytics output_name
TraceProximityEvents_geoanalytics output_name

Source: List of all parameter names of all geoprocessing tools in ArcGIS Pro

KoryKramer

@Bud see the conversation here https://community.esri.com/t5/arcgis-pro-ideas/consistency-in-output-field-and-location/idi-p/973267 Not every tool was updated (because it will be necessary to deprecate tools and replace them which is likely more disruptive to users than having the two parameters), but due to the request, the opportunity of a breaking change release at 3.0 and combining a number of various users requests into the updated Export Features and Export Table tools, we made the change in those tools. 

Bud
by

Here are a few more tools that have a parameter that contains the word "path". There could be a few where the parameter is similar to the  "output_name" or "output_location" parameters mentioned above. Such as Create Unregistered Feature Class and Create Unregistered Table.

AddAttachments_management in_match_path_field
AddDataToTrajectoryDataset_management input_path
AddLinearDispatchLayout_nd is_path_preserved
AddRastersToMosaicDataset_management input_path
AddReshapeDiagramEdgesLayout_nd is_path_preserved
AddTerminalConfiguration_un default_path
AddTerminalConfiguration_un valid_paths
AddTraceConfiguration_tn path_direction
AddTraceRule_nd path_direction
AddTraceRule_nd path_network_weight_name
ApplyLinearDispatchLayout_nd is_path_preserved
BIMFileToGeodatabase_conversion out_gdb_path
BuildOrientedImageryFootprint_oi out_dataset_path
CADToGeodatabase_conversion out_gdb_path
CancelRemainingTasks_topographic database_path
ClassifyIndoorPathways_indoors target_pathways
ClassifyIndoorPathways_indoors updated_pathways
CopyExtendedProperties_topographic database_path
CopyJobFiles_topographic database_path
CopyJobFiles_topographic source_path
CopyJobFiles_topographic target_path
CostConnectivity_sa out_neighbor_paths
CostPath_sa path_type
CostPathAsPolyline_ra pathType
CostPathAsPolyline_sa path_type
CreateCatalogDataset_management out_path
CreateCloudStorageConnectionFile_management out_folder_path
CreateDatabaseConnection_management out_folder_path
CreateFeatureclass_management out_path
CreateFeatureDataset_management out_dataset_path
CreateFileGDB_management out_folder_path
CreateFolder_management out_folder_path
CreateJobForTask_topographic database_path
CreateLasDataset_management relative_paths
CreateLRSFromExistingDataset_locref out_path
CreateLRSNetwork_locref in_path
CreateMobileGDB_management out_folder_path
CreateOrientedImageryDataset_oi out_dataset_path
CreateRandomPoints_management out_path
CreateRandomRaster_management out_path
CreateRasterDataset_management out_path
CreateReplica_management out_filegdb_folder_path
CreateSpatialType_management st_shape_library_path
CreateTable_management out_path
CreateTaskGroupJobs_topographic database_path
CreateUnRegisteredFeatureclass_management out_path
CreateUnRegisteredTable_management out_path
DetermineTravelCostPathAsPolyline_ra pathType
DetermineTravelCostPathsToDestinations_ra pathType
ExportMapServerCache_server output_cache_path
ExportMapServerCache_server target_cache_path
ExportMosaicDatasetPaths_management types_of_paths
ExportTopologyErrors_management out_path
GAGetModelParameter_ga model_param_xpath
GASetModelParameter_ga model_param_xpath
GenerateAttachmentMatchTable_management in_use_relative_paths
GenerateFloorTransitions_indoors pathway_features
GenerateIndoorPathways_indoors target_pathways
GenerateIndoorPathways_indoors updated_pathways
GetFeaturesByJobAOI_topographic database_path
InsertTaskGroup_topographic database_path
LandXMLToTin_3d in_landxml_path
LeastCostPath_intelligence out_path_feature_class
OptimalPathAsLine_ra pathType
OptimalPathAsLine_sa create_network_paths
OptimalPathAsLine_sa path_type
OptimalPathAsRaster_ra pathType
OptimalPathAsRaster_sa out_path_accumulation_raster
OptimalPathAsRaster_sa path_type
OptimalRegionConnections_sa out_neighbor_paths
ParsePathExt_mb path
PublishWorkflowService_wmx input_database_path
PublishWorkflowService_wmx output_map_service_draft_path
PublishWorkflowService_wmx output_workflow_service_draft_path
RepairMosaicDatasetPaths_management paths_list
RepairTrajectoryDatasetPaths_management paths_list
ReshapeDiagramEdgesLayout_nd is_path_preserved
SaveToLayerFile_management is_relative_path
SetDataWorkspace_topographic database_path
SetNextTask_topographic database_path
SetProductionProperties_topographic database_path
SetTaskGroupDependencies_topographic database_path
SetTaskList_topographic database_path
SetTaskStatus_topographic database_path
ThinIndoorPathways_indoors in_pathway_features
ThinIndoorPathways_indoors target_pathways
ThinIndoorPathways_indoors updated_pathways
Trace_tn path_direction
Trace_tn shortest_path_network_attribute_name
Trace_un shortest_path_network_attribute_name
TransferFiles_management input_paths
UpdateExtendedProperty_topographic database_path
UpdateOrientedImageryDatasetProperties_oi dem_path_prefix
UpdateOrientedImageryDatasetProperties_oi dem_path_suffix
UpdateOrientedImageryDatasetProperties_oi depth_image_path_prefix
UpdateOrientedImageryDatasetProperties_oi depth_image_path_suffix
UpdateOrientedImageryDatasetProperties_oi image_path_prefix
UpdateOrientedImageryDatasetProperties_oi image_path_suffix
UpdatePropertyCount_topographic database_path
UpdateTaskGroupMetrics_topographic database_path
UpgradeSceneLayer_management out_folder_path
VideoMetadataToFeatureClass_ia imagepath
VideoMetadataToFeatureClass_ia imagepath_type
WFSToFeatureClass_conversion out_path