POST
|
Putting a single value in (parens) doesn't turn it into a tuple. >>> path=("C:/Users/fazeel/Desktop/ExampleCase/LeicesterCity_Leeds") >>> type(path) <class 'str'> You'd need to add a comma to get that: >>> path=("C:/Users/fazeel/Desktop/ExampleCase/LeicesterCity_Leeds",) >>> type(path) <class 'tuple'>
... View more
11-12-2014
09:45 AM
|
1
|
1
|
708
|
POST
|
The error message says it all. An UPDATE statement doesn’t return rows. You can execute() without calling fetchall().
... View more
10-31-2014
11:20 AM
|
0
|
1
|
3246
|
POST
|
Yes. You'd do parameters[3].valueAsText = "returnvalue".
... View more
10-29-2014
01:41 PM
|
0
|
2
|
677
|
POST
|
Get rid of that whole part at the top of your script where you create the sr and set the environment. It'll only get executed once and may get clobbered by anything else. Instead set it on the point:
ptGeometry = arcpy.PointGeometry(inpoint, arcpy.SpatialReference(4326))
... View more
10-29-2014
09:50 AM
|
0
|
4
|
677
|
POST
|
arcpy mostly just wraps arcgisscripting in a Python-programmer-friendly way. Like Dan said, arcpy.da cursors are way faster. Otherwise any speed improvements you'd see in arcpy (I'm not aware of too many, aside from a few specific geoprocessing tools that now benchmark better) will also apply to arcgisscripting.
... View more
10-29-2014
09:40 AM
|
1
|
0
|
521
|
POST
|
You probably don't need to bother with the .EmptyClipboard() call at all, I'd assume SetClipboardData would just overwrite it if needed. Also make sure you correctly case CloseClipboard() in your code, it's closeClipboard() in your source right now.
... View more
10-22-2014
11:36 AM
|
0
|
0
|
656
|
POST
|
That is probably the problem. You installed Python after installing ArcGIS? You've probably messed up your installation now, you may want to uninstall both and reinstall just ArcGIS. As a hack, you may be able to run C:\Python27\ArcGIS10.1\python.exe right now. If it won't import arcpy, then you'll need to do the reinstallation first. But python.exe will live in C:\Python27\ArcGIS10.1\, not C:\Python27\ after you've installed ArcGIS.
... View more
10-21-2014
04:32 PM
|
1
|
0
|
1020
|
POST
|
Is ArcGIS installed on your machine? Which version? Did you install Python yourself?
... View more
10-21-2014
02:06 PM
|
0
|
3
|
1020
|
POST
|
This was initially intended to be just for printing out, I never really expected people to look at this thing on a computer screen, so I didn't even think of links. On that note, I can't even add links as the markup language doesn't support it and the scheme for links to online help topics changes often enough from version to version that it'd be way more maintenance for me just to keep on top of it. You'll need to ungroup the elements in your PDF editor. Edit in Illustrator if Adobe Pro isn't doing it. I don't think there are any restrictions set on the PDF. I was also able to import both the PDF and the SVG into Inkscape (a free vector graphics editor) and manipulate it that way.
... View more
10-18-2014
11:53 AM
|
0
|
1
|
1027
|
POST
|
A very vocal subset of users want the list of classes and functions in this form. There are enough people asking for it that we provide it. I'd guide new users to the online help as there are code samples and context for each class and function. I provide this as a good-enough solution for that subset of users that prefer to see their functions and classes all on one large piece of paper on their office wall. It's not made in any formal Esri processes. I do it in my spare time, outside of my regular duties, to make users happy. All this script does is turn a subset of the documentation, which is available online (10.1, 10.2, Pro App 1.0) and make a graphviz document which is then exported to PDF. The internal sources provide XML versions of the HTML help which I parse in the script and turn into boxes full of words. Every piece of information on these PDFs is already available, in a different form, in the ArcGIS help. There is no hidden information or secrets being withheld from you here. I am merely taking the same information in a different format (XML, versus the HTML it's published to online) and transforming some of it into yet another format. This PDF is not actively maintained or authored by hand. It is a script that makes that plain-text .graphviz file in the .ZIP archive, then uses the command-line graphviz tool to turn that text into PDF: C:\Python27\python classloader.py arcpyxml\ "C:\Program Files (x86)\Graphviz\bin\fdp.exe" Diagram.graphviz -T pdf -o WallReference1.pdf There's really not much more to it than that. This document isn't used anywhere internally by Esri. It's an artifact of the information within the help system and some scripting. The script will not be of much use to you as you don't have any XML help files. The XML help files are translated into HTML before they are published online.
... View more
10-17-2014
10:18 AM
|
2
|
3
|
1027
|
POST
|
Add a second parameter, datatype Long and type Output. At the end of your script do this:
count = int(arcpy.GetCount_management(data_fl)[0])
if count > 0:
arcpy.arcpy.AddMessage("you have chosen {0} features".format(count))
else:
arcpy.arcpy.AddMessage("no chosen features")
# Set as actual output
arcpy.SetParameter(1, count)
... View more
10-16-2014
11:47 AM
|
0
|
0
|
473
|
POST
|
The script used is 100% useless on its own as it pulls documentation from sources on the internal Esri network. Why do you need it?
... View more
10-16-2014
11:41 AM
|
0
|
7
|
1027
|
POST
|
Attached is the same for 10.3 ArcGIS for Desktop/Server and 10.3 ArcGIS Pro.
... View more
10-15-2014
03:13 PM
|
6
|
0
|
1027
|
POST
|
Remember that SHAPE is a special case, it's a column name in the row. All of the Row's column name attributes are computed at the very last possible minute. The class has its usual attributes like its getValue method, but then it overrides the __getattr__ method as a last-ditch chance for the class instance to return a value for object.SOMETHING before Python throws an AttributeError . TL;DR: The row class doesn't have each individual column name as an attribute. It instead uses some Python magic to allow Row.COLUMN to act as syntactic sugar for Row.getValue("COLUMN") .
... View more
10-07-2014
09:06 AM
|
2
|
1
|
396
|
Title | Kudos | Posted |
---|---|---|
1 | 09-26-2012 02:46 AM | |
2 | 01-06-2011 08:22 AM | |
1 | 03-25-2014 12:18 PM | |
1 | 08-12-2014 09:36 AM | |
1 | 03-31-2010 08:56 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:22 AM
|