Trying to set output Extent for Topo To Raster in Python

Discussion created by chagan02 on Feb 26, 2011
Latest reply on Mar 3, 2011 by mzcoyle
Ok, So the code is below.  It works except the way its written it uses the default output extent.  I need to be able to add a shapefile as the output extent, or a variable (which is a shapefile declared at the top of the code).  It seems there are a few different ways to do the topo to raster syntax.  This one works, I just need to add the output extent and I dont know where exactlly?

My variable for my output extent is: MEG_counties_shp__2_

# Process: Topo to Raster
from import *
import arcpy
outTTR = TopoToRaster([TopoPointElevation([['R:\\PrecipMap\\DailyPrecip.shp', 'pcpn']])], "0.003", "", "20", "", "", "ENFORCE", "CONTOUR", "40", "", "1", "0", "", "")"R:\\ArcGIS\\Default.gdb\\TopoToR_shp2")
print 'Topo To Raster Done'

I have tried this but it does not work:
outTTR = TopoToRaster([TopoPointElevation([['R:\\PrecipMap\\DailyPrecip.shp', 'pcpn']])], "0.003", MEG_counties_shp__2_,"", "20", "", "", "ENFORCE", "CONTOUR", "40", "", "1", "0", "", "")"R:\\ArcGIS\\Default.gdb\\TopoToR_shp2")
print 'Topo To Raster Done'