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

ArcSDE/Oracle connection management from Python

I am a user with non-admin rights on a versioned ArcSDE Oracle geodatabase. I am writing a Python 2.6 script, and running it in ArcGIS 10.0 SP4. The script opens a connection from an .SDE file. I need...

View Article


Labeling works in 10, but not 10.1

I have a python script which at one point adds a new set of features, symbolizes, and labels them. In 10 everything works correctly, but when I run the script in 10.1, the labels are lost even though...

View Article


Python script for mass find and replace of workspace path?

Hi folks, As our research group has run out of space on a network drive, our IT department just moved all of our folders/data to a new network drive. However, in doing this all of the folder structures...

View Article

change variable values to None by iterating list...

Hello, I have a script that I run as a tool, so many of the variables come in as "GetParameterAsText". I'm using many of these variables to update rows in a feature class, and I'm having a little bit...

View Article

ARC 10.0 CADToGeodatabase() syntax to write to existing FC in existing group...

I want to write geometry data (polylines,polygons,polygons with holes) from a dgn CADfile to a specific Featureclass under a specific group dataset (group layer). The FGDB is an empty template, I don't...

View Article


Stripping Text in Field Calculator using wildcard

Is there anyway to strip text using wild card... As in: HITCH ENTERPRISES, INC. WARRANTY DEED BOOK 552, PAGE 532 (NW/4) (NE/4) (SE/4) OUT OF SECTION 29 TOWNSHIP 1N RANGE 16E TEXAS COUNTY, OKLAHOMA...

View Article

Python called from batch file --> geoprocessing logs

Hi all, I am calling a number of Python scripts from a batch file like below (simplified) SET PATH=%PATH%;D:\apps\Python27\ArcGIS10.1 SET PYSCRIPT="D:\Projects\MyTestScript.py" python %PYSCRIPT%and...

View Article

Define precision of Number to Text in Python

Greetings, I am attempting to calc a LAT and LONG that is in DD to new fields that are DMS. I have the python below that does the trick however I cannot define the precision of the Seconds. So the...

View Article


add data from a list using "row.setValue" to a field

Hi, Using a script I get a list of values​​, which I need to add a field using "row.Setvalue" but I have not been successful. I hope you can help me! thanks GHJ Code: import arcpy import glob, os...

View Article


determining the right geographic transformation for a Project_management()

Hi all, I have a script that opens a user-specified MXD and processes user-specified layers in it. Part of the processing involves projecting the data from whatever GCS it's in, to whatever PCS the...

View Article

Multiple rasters to .lyr

Hello: I'm trying to make a .lyr file to bring into ArcMap with arcpy.mapping. I can bring a single raster into a .lyr with the script below. I'm unsure how to proceed to get multiple rasters from the...

View Article

FieldInfo fails when using SpatialJoin

I am trying to do a point-in-polygon overlay using SpatialJoin and at the same time suppress most of the fields and rename the ones I want to keep. Theoretically all possible with a layer and a...

View Article

getting the specified geographic transformation, or at least the GCS, of a...

Hi all, I have a script that opens a user-specified MXD and processes user-specified layers in it. Part of the processing involves projecting the data from whatever GCS it's in, to whatever PCS the...

View Article


Pythonaddins script edit

I have created an AddIn using pythonaddins. But when I edit python script for that addin and re-create '.esriaddin' file, I don't get updated results using that. Do I need to re-create AddIn each time...

View Article

makefeaturelayer in selection use AND statement

I have export makefeature layer in model builder to python arcpy.MakeFeatureLayer_management("l_GBKN_mut", "l_GBKN_mut_layer", "\"LKICODE\" = v_object AND \"PRECISIE\" =v_precisie", "",) And afcourse...

View Article


GA Layer to Points loop

Hello All and thank you in advance for your assistance! I've got some python code for the GA Layer to Points function: # Import system modules import arcpy # Set local variables inLayer =...

View Article

Launch Python script on mxd open?

We are upgrading/migrating to a new SDE server, leaving my organization with probably thousands of .mxds with datasource references pointing to the old, soon to go away, server. I could write a py...

View Article


Draw a rectangle by dragging

Hi Experts How can I draw a rectangle on my map by clicking and dragging my cursor click using python codes? Best Regards Babak

View Article

Enable ArcMap Tool by python codes

How can I enable Select Features tool using python codes? Something like Code: SelectFeatures.enable = True I am not sure that it is correct but it must be something like this Regards Babak

View Article

How to save output files in a folder created within python Add-In?

Output folder is defined during execution of python Add-In and it is required that output should be stored in the created folder. But I am getting an error pertaining to output folder string such as...

View Article
Browsing all 2485 articles
Browse latest View live