I am trying to create a GP Tool that I am trying to publish to Portal. It works in ArcGIS Pro but will not publish...
- I created a new Toolbox
- I created a New Script in the tool box
- I set 4 parameters in the Script and set defaults for them
- Parameters Default Values
- in_las C:\Temp\LazToLas\LazFiles
- target_folder C:\Temp\LazToLas\LazFiles
- define_coordinate_system ALL_FILES
- in_coordinate_system GEOGCS["GCS_NAD_1983_2011, DATUM["D_NAD_1983_2011",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
I put this code in the Script and when I double click the script in the toolbox it runs fine….Basically converting .laz files to .las files.
I then go to publish this GP Tool to my server and I get these two errors:
- Server version 10.8.1 tool ConvertLas_conversion does not have new parameter in_coordinate_system
- Server version 10.8.1 tool ConvertLas_conversion does not have new parameter define_coordinate_system
Why does this run via double clicking the script in the toolbox and fails when I try to publish this? Errors above…..
------- Parameters on the Script File in the Toolbox

------- ERROR:

------- CODE:
import arcpy
def ScriptTool(param0, param1, param2, param3):
# Script execution code goes here
LazFiles = param0
LasDataset = param1
defineCoord = param2
inCoord = param3
OutputLASDataset_lasd = param1 + "output.lasd"
arcpy.conversion.ConvertLas(in_las=LazFiles, target_folder=LasDataset, file_version="SAME_AS_INPUT", point_format="",compression="NO_COMPRESSION",
las_options=["REARRANGE_POINTS"], out_las_dataset=OutputLASDataset_lasd,define_coordinate_system=param2, in_coordinate_system=param3)
return
# This is used to execute code if the file was run but not imported
if __name__ == '__main__':
# Tool parameter accessed with GetParameter or GetParameterAsText
param0 = arcpy.GetParameterAsText(0)
param1 = arcpy.GetParameterAsText(1)
param2 = arcpy.GetParameterAsText(2)
param3 = arcpy.GetParameterAsText(3)
"GEOGCS['GCS_NAD_1983_2011',DATUM['D_NAD_1983_2011',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]"
ScriptTool(param0, param1, param2, param3)