AnsweredAssumed Answered

How can get the actual Cell Size form "Analysis Cell Size" parameter

Question asked by nikfal on May 11, 2017
Latest reply on Jun 3, 2017 by Dan_Patterson

I am trying to build a Python Toolbox. I need to get the cell size using the following code snippet. Using this parameter you can directly enter the cell size as a number or pick a GIS layer to let the ArcPy to calculate the cell size (If the layer is raster, it will be same as the raster's cell size, otherwise it will be the minimum extent /250).  

It is working well and I can use the defined parameter (cell_Size) as Cellsize in any tool (i.e. "Point to Raster"). In my program I need the cell size value (as number) however when you use "cell_Size.valueAsText", you get just the root of the layer as string!

I need the property that I can get the calculated cell size by ArcPy. I tried "cell_Size.Cellsize" , "cell_Size.size" etc. but they are not working. 

    # First parameter  
    cell_Size = arcpy.Parameter( 
    displayName = "Cell Size", 
    name = "cell_Size", 
    datatype = "Analysis Cell Size", 
    direction="Input ")