Failed on input OID
I have a layer in my TOC that has a joined table. When i run the following code it get Failed on input OID. I believe it is because the layer "vector.DBO.Taxparcels" has a table joined but i am not...
View ArticleRemapValue Usage
I successfully produce and empty cost raster at the end of this script. I am fairly confident it has something to do with RemapValue parameters? Does anyone know why my out put cost distance raster is...
View ArticleHelp w/ MakeFeatureLayer and Assertion Error
I'm trying to write a script that compiles all of the stuff I do to a geodatabase on a weekly basis. This includes: 1. Backing up the geodatabase 2. Renaming the backed up geodatabase to include a...
View ArticleSummary Statistics Script
Hi! I am attempting to write a script that will provide me with average NDVI pixel values in a raster, so I can later put the means into a time series. I keep getting an invalid syntax error in the...
View ArticleBatch Apply Definition Query to all layers (within MXD)
Hey Guys, So here's the issue I have multiple mxds in a folder there are subfolders within this parent foder (e.g. c:\Temp\Folder1 etc) Each MXD has varying number of layers/feature classes Some MXDs...
View ArticlePYthon _CAN
Hi every one, I am new to this python programming. Recently, I have started working with python programming to communicate with PCAN-usb. I was able to Initialize PCAN, write message but i am unable to...
View Articleget extent of selected features in layer - zoom to/locate script in mxd
Hi! I need to make a script that does something like "zoom to/locate" = in ArcMap, user types a ID of an feature and map zooms to the feature... It needs to be independent on data in current mxd. My...
View ArticlePublishing SD in Citrix XenApp environment
Hi All, I need help figuring out why my publishing efforts fail. I have used the same Python script on my desktop and published many service definitions. Now, I am working in a virtual desktop...
View ArticleCopy LayoutElements from one Map to Another
I am trying to figure out if there is a way to copy layout elements (Graphic of Text) from one map to another in python. I have a series of maps that I use to create dynamic tables and export to PDF....
View ArticlePython won't continue to the third loop/update cursor
Hi, Can someone look at my code and tell me why it is not working: Code: try: with arcpy.da.SearchCursor("selectingBufferLayer", isSelectorField) as cursor: for row in cursor:...
View ArticleExportXYV with standalone script doesn't work
I'm so close - it writes the txt file or csv, writes the field names, but doesn't write any of the field data. Where am I going wrong? These are coverages, and it works using arctoolbox from within...
View ArticleLable BASED on a features Color
I am looking for a script to use in a features label would label it with that features color. In RGB
View Articleadding layer twice
I am not sure why layers are being added twice here? Code: import arcpy from arcpy import env import pythonaddins class ButtonClass1(object): """Implementation for add_Layers_addin.button...
View ArticleUsing Validator Class updateParameter Function to Change Parameter Datatype
I am building an ArcGIS gui that takes 4 parameters: An input feature class or shapefile A parameter to query on the input feature class or shapefile A predefinied multivalue list of layer names that...
View ArticleConnecting a broken line segment
I'm working with a line feature representing a pipeline. There are breaks in the line with no feature. I would like to fill in those breaks with lines. Currently I'm basically drawing lines with end...
View ArticleChanging geometries but keeping attributes
I have a python script that takes a shapefile of points and moves those points to a new location. The output feature only has FID, ID, and geometry type, is there a way to preserve the attributes from...
View ArticlePCAN _XCP
hi, Can any one suggest me how can I communicate CAN_USB using XCP protocols in python programming. thanks.
View ArticleExport Dataframe to PDF - extent problems
We are trying to create a new PDF for each polygon in our feature class. The scale must stay the same, so the page size needs to change. This also means that DataDrivenPages isn't a workable option for...
View ArticleCreate SQL STatement
Can somebody tell me how to use the following to effectively call on create sql function using paramters 0-9 below: Thanks in advance, Code: def isNumber(value): try: Decimal(value) except:...
View ArticleI want one output of a pyt to appear in the Table of Contents, but not the...
Hi, I have a pyt which outputs a shapefile and a csv file, I want the shapefile output to be displayed when the processing finishes, but don't want the csv file to be added to the Table of Contents in...
View Article