Ticket #50 (closed Defect: fixed)
OverriddenByArcGISGeoprocessorVariable design for overwriteExisting parameter is flawed
| Reported by: | jjr8 | Owned by: | jjr8 |
|---|---|---|---|
| Priority: | Medium | Milestone: | 0.1 |
| Component: | Core - Other | Version: | null |
| Keywords: | Cc: |
Description (last modified by jjr8) (diff)
The intent of the OverriddenByArcGISGeoprocessorVariable was to allow method parameters to be overridden by ArcGIS environment settings, ignoring whatever the caller supplied for the parameter. But there is a problem with this approach.
It works fine for methods that do not use the ArcGIS geoprocessor. In this situation, the geoprocessor will not have been initialized and thus the override will not occur. But methods that do use the ArcGIS geoprocessor cause it to be initialized as a dependency. Then, when the parameters are validated, they are overridden. This happens even when the user invokes the method from a script, completely outside of the ArcGIS user interface.
As a result, the caller's values for certain parameters are always ignored. For example, in the HDF.SDSToArcGISRaster method, the overwriteExisting parameter is always set to gp.OverwriteOutput, no matter what.
This design needs to be rethought.
