AnsweredAssumed Answered

Setting Mask from Parameter

Question asked by tonalca6864 on Dec 19, 2013
Latest reply on Dec 20, 2013 by tonalca6864
Hi everyone,

This may seem like an easy one but I cannot quite find the way:

When setting the environments, I want to use one of the parameters ("InputZ") as a mask for the different processes within the script.

It works fine like this:
arcpy.env.mask = r"D:\PROGRAMMES\LFP_Source_Rocks\ArcGIS\00_LFP_GLOBAL_MODEL\INPUT.gdb\Maas_Bathymetry"

but I want this:
arcpy.env.mask = (InputZ)

using ArcView 10.0

here is the beginning of the code:

import arcpy import string from arcpy import env arcpy.env.overwriteOutput=True from import * arcpy.CheckOutExtension("Spatial")  # Set the output location, extent and Mask  OutLocation = arcpy.GetParameterAsText(0)  arcpy.env.extent = arcpy.Extent(-180.0, -90.0, 180.0, 90.0)  arcpy.env.mask = (InputZ)  # Input strings and variables  StageAge = str(arcpy.GetParameterAsText(1))  BSS = arcpy.Raster(arcpy.GetParameterAsText(2))  InputLatitude = arcpy.Raster(arcpy.GetParameterAsText(3))  InputZ = arcpy.Raster(arcpy.GetParameterAsText(4))  InputCountrylines = arcpy.GetParameterAsText(5)  NPPEquation = str(arcpy.GetParameterAsText(6))

Any help will be greatly appreciated.

Many thanks