Quantcast
Channel: Forums - Python
Browsing all 2485 articles
Browse latest View live
↧

arcpy.mapping ListBookmarks error

I get the following error when using the arcpy.mapping ListBookmarks function in a script: Traceback (most recent call last): File "X:\Temp\Tools\MXD_Bookmarks_to_Polygon.py", line 28, in...

View Article


Can i insert or update data in enterprise Geodatabase using Python Script.

Is it possible to update the data in enterprise Geodatabase using Python Script? e.g. insert , update, delete etc. I want to store some data in my Model Builder, based on some condition. If yes, then...

View Article


Is it Possible to Generate Barcodes in ArcGIS Layout using Python scripts

Is it Possible to Generate Barcodes in ArcGIS Layout using Python scripts, any thoughts? Thanks

View Article

Point layer

Excuse me, help me this code does not work when I make it as a script tool also it does not show to any error but no results ?????????????????? import arcpy arcpy.env.workspace="C:\\test"...

View Article

Failed when running arcpy.StageService_server('','' )

Hi guys, I am a Chinese young girl learning how to use Python to publish the map service. I have an error when I was trying to Stage Service (Server). The following is my code: env=r"C:/test"...

View Article


Parameter value list

Hello I have a project with data driven pages enabled. I want to allow the user to choose a particular page to print from a dropdown list of the page names via a python script. I've been trying to work...

View Article

How to determine number of records using arcpy.da.SearchCursor

Does anyone know of a quick way to return the number of records in a query constrained Search Cursor using the da module? Code: rows = arcpy.da.SearchCursor(someFC,someFields,someQuery) print...

View Article

Attribute error, object has no attribute

So I am very new to python and working through my first online course. Does anyone know how I can fix this error: >>>...

View Article


Printing to Text File

so, I got my script ready and I am trying to print out to a text file: when I do a Print animal at the end of the code I get: CATS DOGS APPLES ORANGES Then I tried file = open('file.txt','w')...

View Article


Image may be NSFW.
Clik here to view.

Python script to create multiple file geodatabases from enterprise geodatabase,

Python script to create multiple file geodatabases from enterprise geodatabase, I’m looking for a python script that creates multiple file geodatabases from multiple enterprise geodatabases in one go....

View Article

rili need urgent help with this code

the question is " write a python that will read a string of any length at least a 100 characters and will print out on the screen the alphabets and the number of tiomes each character appears in the...

View Article

Cleaning up temporary layers created by python toolbox script

ArcMap 10.2.1 / Python 2.7 I have several tools in a python toolbox. When I run through the tools in succession, temporary layers created in previously run tools show up as parameters in later tools....

View Article

Image may be NSFW.
Clik here to view.

Issue updating BLOB field with XML bytearray

I have a script that uses an Update Cursor to update a BLOB field with XML if certain criteria are met. Code: from lxml import etree import arcpy data = open("C:/data.txt", "r").readlines() with...

View Article


Image may be NSFW.
Clik here to view.

Accessing Parcel Fabric Layers

I am attempting to create a python script with inputs from the parcel fabric. I am not sure if this is possible, because I am already having trouble with the most basic of functions. Code:...

View Article

Python Add-In, Combo Box and Zoom to Selected Unstable

I am trying to create a python add-in toolbar with a combo box. The combo box lists all of the unique [SITE_NUM] values in my SITE feature class. The user should be able to select a SITE_NUM from the...

View Article


HELP ME PLEASE! Script to clip and ROI using a shape file

Hi! Please help me! I created a script a few weeks ago which would create an ROI using the clipping geometry tool from a shapefile. The script had originally worked and now will only error out. I...

View Article

Fast Polygons Insert

Hi :) I'm currently trying to insert polygons into a feature class given a list of (ID, X coordinate, Y coordinate) from Oracle So far I do: Code: pntsLayer = arcpy.InsertCursor(myTableLnk) def...

View Article


Looping Through FeatureClasses

I am trying to build a script that will iterate through each feature class while capturing the last record per the required query. I haven't had a chance to really test this out yet. Just seems like I...

View Article

Image may be NSFW.
Clik here to view.

Requierd Python Help

Dear sir I want to update TextString field in "PCL_Anno_New" annotation feature class in a geodatabase. For that I join "Conv_Tab" and try to update. it gives Following error. Can you give me help to...

View Article

LAS to Raster conversion

Hi, I'm having a problem setting the interpolation type in the arcpy.LasDatasetToRaster_conversion python code...I wish to use: Triangulation, LINEAR, NO_THINNING as the options... however there...

View Article
Browsing all 2485 articles
Browse latest View live