POST
|
After 15 years they're going to switch the order? I remember back in the day when you didn't even need the "toolbox" (e.g."_management") ~AND~ you could use any case you wanted (e.g. SeLeCtLaYeRbYaTTrIBuTe). As a old timer, I don't like it...and get off my lawn!
... View more
08-05-2020
09:24 AM
|
2
|
2
|
2159
|
IDEA
|
Ha! Unfortunately Noel is incorrect. It hasn't been 9 years, IT'S BEEN AT LEAST 15 YEARS! (See my post above).
... View more
11-13-2019
09:34 AM
|
1
|
2
|
1121
|
IDEA
|
We've been discussing/arguing about not having this feature at least since Esri adopted python in 2005. It's been almost 15 years! If it hasn't happened by now, pretty sure it's not going to happen!! I think it's funny(?) that this thread is tagged "Under Consideration". This thread is 9 years old!
... View more
01-09-2019
06:22 AM
|
5
|
1
|
945
|
POST
|
Will do. Thanks. Now I am seeing another new thing! What in the world is this white circle next to one of my def()'s? [ATTACH=CONFIG]34040[/ATTACH] Looks like you've toggled a break point in the debugger. If you put your cursor on that line, then go File > Debug > and uncheck Toggle Breakpoint, should get rid of it...
... View more
05-23-2014
06:57 AM
|
0
|
0
|
526
|
POST
|
I used to get this issue quite often (I've now moved to PyScripter and haven't had this issue since). The following always works for me. Highlight the "infected area" > right click > choose Source Code > then click Untabify Region. Works every time for me. No idea what causes this, but it happened dozens of times over the years, while using many different PythonWin versions.
... View more
05-23-2014
06:33 AM
|
0
|
0
|
526
|
POST
|
There is no direct way to reference an MS Access Table to run thru the TableToTable_conversion method (I didn't notice it in the doc). OK this is strange...it IS actually an option (in red below) in the doc and works if you use the tool from the toolbox, but I can't get it to work in a script...???
import arcpy, os
arcpy.env.workspace = os.getcwd()
arcpy.TableToTable_conversion('NP.mdb/myTable', 'NFG.gdb', "outTable")
Usage This tool supports the following table formats as input: dBASE (.dbf) Comma Separate Value (.csv) tab delimited text (.txt) INFO VPF OLE database personal, file, or SDE geodatabase in-memory table views
... View more
05-22-2014
10:11 AM
|
0
|
0
|
531
|
POST
|
There is no direct way to reference an MS Access Table to run thru the TableToTable_conversion method (I didn't notice it in the doc). Well, at least it didn't work for me just now -- I wonder if this has to do with 64bit and Access Drivers related issues? My mistake, I read it as MS Excel...instead of MS Access.
... View more
05-22-2014
09:33 AM
|
0
|
0
|
531
|
POST
|
I've been after some help for two days now.. Still have not found and example that will work for me.. Use Py to get a table from MS ACCESS, clip, join and return the result in a new table. Walt. Python examples are at the bottom of each the following pages... get a table from MS ACCESS: http://resources.arcgis.com/en/help/main/10.2/index.html#//001200000027000000 clip: http://resources.arcgis.com/en/help/main/10.2/index.html#//000800000004000000 join: http://resources.arcgis.com/en/help/main/10.2/index.html#//001700000064000000 return the result in a new table: http://resources.arcgis.com/en/help/main/10.2/index.html#//001700000035000000
... View more
05-22-2014
08:07 AM
|
0
|
0
|
531
|
POST
|
See here for getting string fields: http://resources.arcgis.com/en/help/main/10.2/index.html#//018v00000012000000 Here's a very simple way to call another script (there are many other ways): os.system("joinfiles.py") or if it's in another directory: os.system("c:/temp/joinfiles.py")
... View more
05-07-2014
09:50 AM
|
0
|
0
|
636
|
POST
|
Didn't have time to test it but something like this should work... import arcpy
# Set input and output FGDBs
inFGDB = "in.gdb"
outFGDB = "out.gdb"
# Loop through inFGDB
arcpy.env.workspace = inFGDB
for fc in arcpy.arcpy.ListFeatureClasses():
# Describe to get type
dscFC = arcpy.Describe(fc)
fcType = dscFC.shapeType
print(fcType)
# Don't get line fcs
if not fcType == "Polyline":
# Copy fc to outFGDB
print("Copy "+inFGDB+"/"+fc+" to "+outFGDB+"/"+fc+" -- "+fcType+"\n")
arcpy.Copy_management(inFGDB+"/"+fc, outFGDB+"/"+fc)
... View more
03-10-2014
08:22 AM
|
0
|
0
|
241
|
POST
|
I do it like this:
# import smtplib module
import smtplib
# This is the body of the email
file = open('c:/temp/log.txt').read()
# Create a connection to our email server via the IP address
server = smtplib.SMTP('333.333.333.3')
# The key here is the word "Subject:" It's a keyword to put the text that follows on the subject line.
subj = "Subject: Python Email"
# Send out the email (must separate subj+"\n"+file or all will go into subject line)
# 3 ARGS only: fromEmail, toEmail, subject and body
server.sendmail('rdh@xxx.com','rdh@xx.xx.com', subj+"\n"+file)
# Terminate the connection to server and quit
server.quit()
... View more
11-19-2013
03:45 AM
|
0
|
0
|
1176
|
POST
|
This will get you the numbers you are looking for. Then you can use the variables "lowRange" & "highRange" to select those records.
set=1
lowRange=1
for highRange in range(100,50001,100):
set=set+1
if set % 2 == 0:
print "From "+str(lowRange)+" To "+str(highRange)
lowRange=lowRange+100
... View more
09-30-2013
05:04 AM
|
0
|
0
|
255
|
POST
|
The big question here is, how are your .csv files named in each folder. If they are all named like your example, it wouldn't be hard to loop through the first folder, split the name on the underscore to get the base name and then use that to grab the compare file in folder 2 for the tool. Is that the case?
... View more
09-24-2013
04:28 AM
|
0
|
0
|
1600
|
Title | Kudos | Posted |
---|---|---|
1 | 02-02-2017 07:49 AM | |
1 | 04-22-2010 04:28 AM | |
1 | 04-21-2010 12:50 PM | |
2 | 08-05-2020 09:24 AM | |
5 | 01-09-2019 06:22 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|