Publish a geoprocessing tool without constants

567
3
09-20-2021 01:06 PM
RPGIS
by
Occasional Contributor III

Hi,

I am trying to publish a script tool as a geoprocessing service, but there are several issues that I have run into recently has caused the tool to not execute as I originally expected.

  1. Some of the inputs are converted into constants despite setting the parameters to only execute when there is user input
  2. the ability to select a feature class which is derived from in input CAD file doesn't seem to work. I don't know if it possible to publish a tool where the end user can upload a CAD file and then select which feature class to extract the data from.

Any help on this would be highly appreciated.

Constant for CAD file_LI.jpg

Constants for user input values.JPG

CAD Extract.JPG

Also, I noticed that when the tool is published that the end user can select an analysis layer, but it appears as though they can only select the layer from the organization, not something that is derived. Is this something that would have to be scripted as an update tool validation in order for the end user to select the feature class?

Feature class.JPG

0 Kudos
3 Replies
IhabHassan
Esri Contributor

HI @RPGIS 

I would suggest to set the type of the CAD file parameter to be "File", and when publishing the GP service to make sure that you check "Upload" within the capabilities configuration.

IhabHassan_1-1632196655212.png

 

IhabHassan_0-1632196517069.png

This should allow you to upload the DWG file instead of having it as a constant.

Regards

Ihab

Regards
Ihab
RPGIS
by
Occasional Contributor III

Thanks @IhabHassan for the suggestion. I will give that a try and test it to see how it performs. As for the other constant issue, I think it may have something to do with having the inputs as a table of values rather than simple input values. Is that the case or is there a way to publish the tool with a table of values as inputs rather than constants? I would greatly appreciate it if you or someone could let me know.

Thanks.

0 Kudos
IhabHassan
Esri Contributor

Might be, not sure, I would choose what is working and get the job done

Regards

Ihab

Regards
Ihab
0 Kudos