[Python] Creating a tool from modelbuilder and adding "export to PDF"

import arcpy Script arguments
crash_counties_shp = arcpy.GetParameterAsText(0) if crash_counties_shp == '#' or not crash_counties_shp: crash_counties_shp = "S:\Inventory\Interns\Katie_Kyzer\Crash_Maps\Model_output\crash_counties.shp" # provide a default value if unspecified
crashes_lat_long_final_shp = arcpy.GetParameterAsText(1) if crashes_lat_long_final_shp == '#' or not crashes_lat_long_final_shp: crashes_lat_long_final_shp = "S:\Inventory\Interns\Katie_Kyzer\Crash_Maps\Model_output\crashes_lat_long_final.shp" # provide a default value if unspecified Local variables:
TableOuputcrash_county_count = crashes_lat_long_final_shp CountyBoundary_joined = Table_Ouput_crash_county_count CountyBoundary_Layer = "CountyBoundary" Process: Count Frequency of Counties
arcpy.Statisticsanalysis(crashes_lat_long_final_shp, Table_Ouputcrash_county_count, "crashes6 COUNT", "crashes_6") Process: Join Summary Table to County Layer
arcpy.AddJoinmanagement(CountyBoundary_Layer, "NAME", Table_Ouputcrash_county_count, "CRASHES_6", "KEEP_ALL") Process: Copy Features into a new shapefile
arcpy.CopyFeatures_management(CountyBoundary_joined, crash_counties_shp, "", "0", "0", "0") Process: Remove Join
arcpy.RemoveJoin_management(CountyBoundary_Layer, "")

Then I want to export the data view to a pdf, so do I just add this to a new line at the end of the script?

arcpy.mapping.exportToPdf (out_pdf, {page_range_type}, {page_range_string}, {multiple_files}, {resolution}, {image_quality}, {colorspace}, {compress_vectors}, {image_compression}, {picture_symbol}, {convert_markers}, {embed_fonts}, {layers_attributes}, {georef_info}, {jpeg_compression_quality}, {show_selection_symbology})
/r/GISscripts Thread