Is it Possible to Generate Barcodes in ArcGIS Layout using Python scripts, any thoughts? Thanks
import arcpy import pythonaddins import os import datetime import time arcpy.env.overwriteOutput = True class FCTSitePlanBatchToolClass(object): """Implementation for FCTSitePlanBatchTool_addin.button (Button)""" def __init__(self): self.enabled = True self.checked = False def onClick(self): mxd = arcpy.mapping.MapDocument("Current") df = arcpy.mapping.ListDataFrames(mxd)[0] arcpy.SelectLayerByAttribute_management("GISMainFabric_Parcels", "CLEAR_SELECTION") arcpy.MakeFeatureLayer_management("GISMainFabric_Parcels", "STemp", '"Plot_Status" = \'ALLOCATED\'AND "SitePlan_Status" = \'NOT GENERATED\'') fc = "STemp" field = "OBJECTID" field1 = "Plot_No" field2 = "Block_No" field3 = "Name_Allottee" field4 = "SitePlan_Status" field5 = "LGA" field6 = "District" field7 = "StatedLen" field8 = "Cadzone" #field9 = "TDP_Status" rows = arcpy.SearchCursor(fc) #row = rows.next() #while row: for row in rows: val = row.OBJECTID val1 = row.Plot_No val2 = row.Block_No val3 = row.Name_Allottee val4 = row.SitePlan_Status val5 = row.LGA val6 = row.District val7 = row.StatedLen val8 = row.Cadzone #val9 = row.TDP_Status whereClause = '"OBJECTID"' + " = '" + str(val) + "'" whereClause2 = '"Block_No"' + " = '" + str(val2) + "'" whereClause3 = '"District"' + " = '" + str(val6) + "'" whereClause4 = '"Cadzone"' + " = '" + str(val8) + "'" whereClause5 = '"Plot_No"' + " = '" + str(val1) + "'" outName = str(val5) + "_LGA" + "(" + str(val6) + "_Area" + ")" outName1 = "Plot_" + str(val1) + "(" "Block_" + str(val2) + ")" outName2 = str(val3) + " Block_" + str(val2) + "_Plot_" + str(val1) + "_" + str(val6) + "_Area_of_" + str(val5) + "_LGA" + ".pdf" arcpy.SelectLayerByAttribute_management("STemp", "NEW_SELECTION", whereClause) arcpy.Buffer_analysis ("STemp", "ClipFeature", "7 meters", "FULL", "ROUND", "LIST")
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.