I have created a model in model builder that takes a data set and then completes a select by attributes, buffer, and create random points geoprocesses (in that order). This works. When I export the model to a python script and run, Arc crashes when it gets to the create random points step. Has anyone else had this issue? Is there a work around?# ---------------------------------------------------------------------------
# Location_Error_Arc10.py
# Created on: 2010-09-10 17:26:43.00000
# (generated by ArcGIS/ModelBuilder)
# Usage: Location_Error_Arc10 <Distance__value_or_field_> <Dg_ysf>
# Description:
# ---------------------------------------------------------------------------
# Import arcpy module
import arcpy
arcpy.env.overwriteOutput = True
# Script arguments
Distance__value_or_field_ = arcpy.GetParameterAsText(0)
Dg_ysf = arcpy.GetParameterAsText(1)
# Local variables:
Output_Location = "C:\\Alamo_Project\\Alamo_Breccia.mdb\\Measured_Sections\\"
Temp_Ysf = "C:\\Alamo_Project\\Alamo_Breccia.mdb\\Measured_Sections\\Temp_Ysf"
Dg_ysf_Buffer = "C:\\Alamo_Project\\Alamo_Breccia.mdb\\Measured_Sections\\Dg_ysf_Buffer"
Dg_ysf_Random__2_ = "C:\\Alamo_Project\\Alamo_Breccia.mdb\\Measured_Sections\\Dg_ysf_Random"
Dg_ysf_Random__3_ = "C:\\Alamo_Project\\Alamo_Breccia.mdb\\Measured_Sections\\Dg_ysf_Random"
# Process: Select Layer By Attribute (6)
arcpy.SelectLayerByAttribute_management(Dg_ysf, "NEW_SELECTION", "[Min_Thick] = '2'")
# Process: Copy Features
arcpy.CopyFeatures_management(Dg_ysf, Temp_Ysf, "", "0", "0", "0")
# Process: Buffer
arcpy.Buffer_analysis(Temp_Ysf, Dg_ysf_Buffer, Distance__value_or_field_, "FULL", "ROUND", "NONE", "")
# Process: Create Random Points
arcpy.CreateRandomPoints_management(Output_Location, "Dg_ysf_Random", Dg_ysf_Buffer, "0 0 250 250", "1", "0 Meters", "POINT", "0")