|
POST
|
If the data is already in a table, it might be more straightforward to run Summary Statistics. Generating a count, minimum, and maximum of NextColumn against BuildingID should get you what you are after. The count will let you know if there are only three records, and the minimum and maximum will show whether any of the values are less than 16 or more than 18. Something like: arcpy.Statistics_analysis(in_table,
out_table,
[ ["NextCol", "COUNT"], ["NextCol", "MIN"], ["NextCol", "MAX"] ],
["BuildIDCol"])
... View more
01-08-2015
08:01 AM
|
1
|
1
|
4326
|
|
POST
|
The following code from the interactive Python window in ArcMap should help get you going: mxd = arcpy.mapping.MapDocument("CURRENT")
for lyr in arcpy.mapping.ListLayers(mxd):
if lyr.symbologyType in ["GRADUATED_COLORS", "GRADUATED_SYMBOLS"]:
print lyr.symbology.classBreakLabels
elif lyr.symbologyType in ["UNIQUE_VALUES"]:
print lyr.symbology.classLabels The classBreakLabels and classLabels properties are read-writeable and store lists. After you get the list, update the contents, and set the properties again; you will need to run arcpy.RefreshActiveView() to see the changes.
... View more
01-07-2015
03:52 PM
|
0
|
4
|
2614
|
|
POST
|
With ArcGIS 10.2.x, Microsoft SQL Server 2008 R2 Express with Advanced Services was included/distributed for use with Personal and Workgroup SDE. I noticed with ArcGIS 10.3 that Microsoft SQL Server 2012 Express, without Advanced Services, is being included/distributed for use with Desktop Database (fka Personal SDE) and Workgroup Database. I believe it was ArcGIS 9.3 where Esri switched over to SQL Server Express with Advanced Services. The ArcGIS 10.2.x Help shines some light on why. Making sure SQL Server Express with Advanced Services is installed: The edition of Microsoft SQL Server Express being used for your database server can be determined from the database server Properties dialog box. XML columns are only supported with SQL Server Express Edition with Advanced Services that have Full-Text Search installed. The Full-Text Search component is required to support the native XML columns used by the geodatabase system tables; when installing SQL Server Express Edition with Advanced Services, you must install Full-Text Search. Other editions of SQL Server Express do not include support for full-text searching. Obviously, something has changed with ArcGIS 10.3 or SQL Server Express 2012 that is allowing Esri to drop the need for Advanced Services, but what exactly and where is it documented? I welcome the change for many reasons, one of which being Advanced Services mushroomed the download or package size from ~250MB to the ~1.5GB. Eliminating SQL Server services simplifies installation and administration and could reduce the security-related footprint of running SQL Server Express, which is good in an organization that deploys as many Desktop and Workgroup Databases as the one I work for currently. This change also piques my interest because it makes me wonder whether SQL Server Express LocalDB support is around the corner.
... View more
01-07-2015
02:48 PM
|
0
|
2
|
6677
|
|
POST
|
Honestly, I think your earlier code was easier to read and fairly close to working/workable. The error trapping at the end confuses me because the try statement is at the same indentation as the for statement that loops through the cursor, so cursor.next() should always generate an error by the time it gets to that line. Also, I think the break statement is prematurely breaking you out of one of your cursors. Without having access to sample data to walk through the code with, I have to bow out. Best of luck.
... View more
01-07-2015
12:42 PM
|
1
|
1
|
2748
|
|
POST
|
From 4 months ago in the beta forums for ArcGIS Pro: Charlie Macleod (Esri Staff\Beta Testers\Pro SDK Beta Testers): So, with regards to the SDK, there is no Beta SDK release with Pro Beta5 or pre-release, With regards to the API - right, so, unlike with Arcobjects where a separate set of PIAs were required - "the" Arcobject API if you like - as ArcGIS Pro is managed you already ~have~ the API. The API is part of the product. Add any Pro .Net assembly reference into to a .Net project and Intellisense will show you the API. The Core.Data namespace is indeed the fine grained API. It comes with every release - Beta5, pre-release, etc. as does every other Pro .Net assembly and its API. Each team is responsible for their respective API - mapping team for mapping API, editing team for editing API and so on. The SDK for Pro is the IDE extensibility - Visual Studio 2013 initially. It extends Pro via Pro's framework (essentially any of the UI elements you see in Pro are extensibility points). You use the SDK templates to make Addins - same as at 10x. What the Addins can do is provided by the ArcGIS Pro APIs.
... View more
01-07-2015
08:36 AM
|
0
|
0
|
892
|
|
POST
|
I will have to look at the script more later, but a quick response to your #1. What is it about u'LASTNAME' that you see as wrong? Is it all caps and it shouldn't be? Is it the Unicode notation in front of the first quote? If it is the latter, you have nothing to worry about. The 'u' isn't part of the actual string, it is simply informing you that the string has been stored as Unicode. You shouldn't have any issues passing that Unicode string back into a feature class, but on the remote chance there is an issue, you can always convert it to ASCII.
... View more
01-07-2015
07:58 AM
|
1
|
4
|
2748
|
|
POST
|
Several years back, Microsoft made an announcement that it was moving forward with more focus on ODBC and moving away from OLE DB for connecting to SQL Server. Nearly two years ago, Microsoft introduced the new Microsoft ODBC Drivers for SQL Server. Beyond introducing these new drivers, Microsoft announced the beginning of the end for the SQL Server Native Client. What's New in SQL Server Native Client (2012): SQL Server 2012 contains the final version of SQL Server Native Client. SQL Server Native Client will not be updated in future releases of SQL Server. However, as a convenience to developers, SQL Server 2012 Native Client will ship in future releases of SQL Server. Recently, I was looking over the Microsoft SQL Server database requirements for ArcGIS 10.3. Microsoft SQL Server 2012 SP1? Check. Microsoft SQL Server 2014? Check. As expected, the page addresses the software you need to connect to SQL Server. Software required to connect to a DBMS Your client machine (for example, the one running ArcMap) will need to have the appropriate client files installed for the RDBMS you are using. These client files are available from their respective RDBMS vendors, but some are also available on My Esri as a convenience. See Database clients for more information. So far, so good. Looking at the database clients page, something did grab my attention. Specifically, the page lists Microsoft SQL Server native client and Microsoft ODBC driver 11 for SQL Server. Well, maybe the deprecated native client was included for backwards compatibility with older versions of SQL Server since ArcGIS 10.3 does support back to SQL Server 2008 SP3. Unfortunately, that argument didn't hold up because the download page for Microsoft ODBC Driver 11 for SQL Server - Windows states that the ODBC driver is backwards compatible to SQL Server 2005 even older than what ArcGIS 10.3 supports. The situation got even worse when I looked at the Help pages for administering geodatabases. The Connect to SQL Server from ArcGIS page actively instructs users to install a now-deprecated client to connect to SQL Server. Connect from ArcGIS for Desktop To connect to a database or geodatabase in SQL Server from ArcGIS for Desktop, install the SQL Server native client on the ArcGIS for Desktop computer and create a connection file in the Catalog tree. First, though, be sure your SQL Server instance can accept connections from remote computers. The worst part of it all, though, is that the most appropriate driver to use isn't even mentioned once in the whole page talking about connecting to SQL Server. The SQL Server Native Client may very well work for most, if not all, situations involving ArcGIS 10.3, but it seems a better practice to move users over to the more current driver while both drivers still work rather than wait for the next version of SQL Server where connections could stop working. Microsoft has been encouraging users to switch for years, I think it is time for Esri to finally start.
... View more
01-06-2015
02:34 PM
|
8
|
0
|
11671
|
|
POST
|
On line 28, try replacing wells with wells1. The SelectLayerByLocation needs to have the selected feature(s) passed to it and not the original feature class.
... View more
01-06-2015
11:20 AM
|
0
|
1
|
3792
|
|
POST
|
There are a couple or more ways to get this working. One of the quickest to implement, although it might not be the most peformant, is to include a SelectLayerByAttribute_management statement before the select by location: # Create search cursor which will iterate through wells, selecting all centroids within a distance
with arcpy.da.SearchCursor(wells, ["OBJECTID"]) as cursor:
for row in cursor:
# select by attribute
SelectLayerByAttribute_management (wells,
"NEW_SELECTION",
"OBJECTID = {}".format(row[0]))
# select by location
arcpy.SelectLayerByLocation_management("orps09_FL",
"WITHIN_A_DISTANCE",
wells,
"0.5 kilometers",
"NEW_SELECTION") The above assumes that OBJECTID is numeric and not a string.
... View more
01-06-2015
09:17 AM
|
0
|
3
|
3793
|
|
POST
|
Are you sure the script is running at all when called from the command line by your other program? If you try printing 'hello world' from the script, does that even work from the command line?
... View more
01-05-2015
07:36 PM
|
0
|
0
|
3673
|
|
POST
|
Agreed. The words keep coming out of their mouths, but actual progress has been painfully slow. Now they have released 10.3 and formally retired SDE command line tools, all while still missing quite a bit of functionality that used to exist. It is not uncommon to find SDE-related bugs, especially relating to views, where Esri's Support documentation says to use SDE command line tools as the workaround. I think the Development teams are putting the screws to their own Support staff as much as they are customers with this one.
... View more
01-05-2015
07:22 PM
|
3
|
0
|
4197
|
|
POST
|
What build number or update number are you running? Complaints about not being able to rename database connections started surfacing 7 or so months ago in the beta community forums. At the time, a bug was logged: NIM101677 - Provide a way to rename database connections. A few months ago, Esri developers stated that renaming connection files would "be supported in Prelease." It appears either the functionality isn't supported yet or there are still some bugs to work out with it. Either way, I encourage you to open an Esri Support case so they can fix what is wrong or know more customers really want this before final release.
... View more
01-05-2015
07:10 PM
|
2
|
2
|
4869
|
|
POST
|
Kirsten Pinkston, thanks for the additional information. Yes, seeing more full releases in MyEsri does assuage some of my concerns. I remain quite interested to see how well partial updates work.
... View more
01-05-2015
06:15 PM
|
0
|
0
|
2494
|
|
BLOG
|
I understand, both the situation and frustration. For reasons only a shrink could speculate about, it bothers me more than it should when I have to stick with a workaround because something that seems so simple simply isn't. Although addressing this issue has gotten easier with Python 3.x, it still seems more complicated than it needs to be.
... View more
01-05-2015
05:41 PM
|
0
|
0
|
613
|
|
BLOG
|
Using a list of key-value pairs is definitely the way to go. Sorting a list of keys works in this example, but in general, it doesn't ensure the original ordering is maintained like using a list of key-value pairs.
... View more
01-05-2015
03:51 PM
|
0
|
0
|
613
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 3 weeks ago | |
| 1 | 4 weeks ago | |
| 1 | 3 weeks ago | |
| 3 | 3 weeks ago | |
| 1 | 05-22-2026 05:27 AM |
| Online Status |
Offline
|
| Date Last Visited |
Thursday
|