POST
|
Hi Karen, Is there a target/estimated date for the upcoming release in which ArcGIS will support AutoCAD 2013 formats? I am trying to figure out if it would be worthwhile to install AutoCAD 2013 on a computer to save files to an older version. Having an idea if the upcoming release is weeks, 2 months, or 6+ months away would be very useful for my decision making. Thank you. Melanie
... View more
05-17-2013
10:11 PM
|
0
|
0
|
587
|
POST
|
Note, I posted the following reply before noticing the AutoCAD 2013 thread. I will watch the AutoCAD 2013 thread for a reply. Hi Karen, Is there a target/estimated date for when ArcGIS will support AutoCAD 2013 formats? I am trying to figure out if it would be worthwhile to install AutoCAD 2013 on a computer to save files to an older version. Knowing if the support is weeks, 2 months, or 6+ months away would be useful for my decision making. Thank you. Melanie
... View more
05-17-2013
09:49 PM
|
0
|
0
|
1314
|
POST
|
Is your multi-value parameter for a script tool or an add-in component? Can you show the outline for the code where you would like to implement this?
... View more
03-15-2013
06:26 PM
|
0
|
0
|
380
|
POST
|
Do both of your rasters use the same projections? Do they both have the same cell sizes? Should r1 be south or north of r2? If so, you might want to try explicitly specifying the axis to concatenate your numpy array on. Here are examples for axis 0 and 1 (at the bottom of the linked page in green). You would want to use axis=0. If that doesn't work, you may need to look at how your environment settings are being applied.
... View more
03-15-2013
06:08 PM
|
0
|
0
|
296
|
POST
|
Code completion for ArcPy should also work for you in PythonWin and IPython. If code completion is not working, you probably just just need to import arcpy to the interactive window. After you do that, try code completion again and it should work. You will need to import arcpy to the interactive window at the start of every Python session where you want the tab completion to work for the arcpy module.
... View more
03-15-2013
05:49 PM
|
0
|
0
|
224
|
POST
|
If you are using ArcGIS 10.1, you can create a Python add-in (application extension) with code that executes on the open document event. Here is a page from ESRI's help listing the events that you can respond to with Python. The help page for application extensions has a python example of code that executes on the open document event.
... View more
01-27-2013
11:20 PM
|
0
|
0
|
336
|
POST
|
When I save my updated script that is part of an add-in, the add-in tools automatically save a backup for me with a number after it. Are the updates you have made in the version of your script that the add-in is using, or are the updates in one of the backups? For one of my add-ins, I realized my updates were not in the current version the add-in was utilizing. I haven't had time to play around with it to fully understand what is going on yet, but you might want to compare the code in your backup script and the "current" version.
... View more
01-27-2013
11:12 PM
|
0
|
0
|
314
|
POST
|
I'm interested in this solution as well. Besides the attempts listed above, I tried checking the extensions in during my extension startup event and saving the Normal.mxt file after checking in the extensions. I temporarily added a bunch of message boxes to my script so I could track what was happening. (I will remove them once my script is running correctly). My message boxes showed the extensions are being checked in, but that the MapDocument.save() is not taking place.
class ExtensionCheck(object):
"""Implementation for MyAddIn_addin.ExtensionCheck (Extension)"""
def __init__(self):
# For performance considerations, please remove all unused methods in this class.
self.enabled = True
def startup(self):
from arcpy.mapping import MapDocument
try:
mx = MapDocument(r'C:\Users\mmaguire\AppData\Roaming\ESRI\Desktop10.1\ArcMap\Templates\Normal.mxt')
pythonaddins.MessageBox('Map document is: ' + mx.filePath, 'Map Document', 0)
if arcpy.CheckExtension("3D") == "Available":
arcpy.CheckOutExtension("3D")
arcpy.CheckInExtension("3D")
pythonaddins.MessageBox('Returned 3D extension', '3D', 0)
if arcpy.CheckExtension("Spatial") == "Available":
arcpy.CheckOutExtension("Spatial")
arcpy.CheckInExtension("Spatial")
pythonaddins.MessageBox('Returned Spatial extension', 'Spatial', 0)
finally:
pythonaddins.MessageBox('Extension check started', 'Extension Check', 0) #Shows up
mx.save()
pythonaddins.MessageBox('Normal.mxt Saved', 'Extension Check', 0) #Never appears
... View more
01-25-2013
05:06 PM
|
0
|
0
|
403
|
POST
|
I have not tried it in my code yet, but there is a walk function in ArcPy 10.1 that should be able to navigate your folders and subfolders if they are nested. It looks like it would be useful for adding all of the rasters to your mxd. I might test that out this evening.
... View more
01-02-2013
07:31 AM
|
0
|
0
|
785
|
POST
|
I agree with the book suggestions for Python Primer and Learning Python. If your ultimate goal is to apply Python to GIS, I would recommend reading them in that order. I had tried a few other Python books first and did not get anywhere. Python Primer really helped me figure out how to combine Python with GIS and gave me a flavor of what I wanted to be able to do. I followed this up by reading Learning Python to be sure I understood the basics and good practice for entry level Python coding. By reading and working through Python Primer first, I was able to think about how I would use the information from Learning Python as I was writing Python scripts that worked with GIS. Another great Python book that is hot off the press is Python for Data Analysis by Wes McKinney (ISBN: 978-1449319793). I would read this one after you have worked through the other two books. It has a lot of useful ideas and examples for anyone using Python to analyze data. There are also Python user groups in a lot of locations that welcome anyone interested in Python (pure beginners to experts). You may want to see if there is a group in your area. This really helped me when I was learning to program. There were also semi-annual free "Code Camps" near where I was living when I was getting started. The first one was over my head in terms of some of the code and vocabulary, but people pointed me towards a lot of great resources, local groups, websites, etc.
... View more
01-01-2013
10:42 AM
|
0
|
0
|
65
|
POST
|
Hi Adrian, You are. In terms of looping through the files in a folder or geodatabase, do you have a folder that already contains a lyr file for each raster that you want to update or do you have a folder/geodatabase that contains rasters that you would like to generate layer files for? Here is code that loops through the layers in an mxd and applies the symbology of the source layer to all of the rasters in the mxd that start with "Reach_probability: import arcpy try: #Specifies mxd mxd = arcpy.mapping.MapDocument(r"H:/Desktop/Masterarbeit/test/Besprechung_Crap Ses.mxd") #Specifies dataframe of interest df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0] #Specifies layer file with the symbology you want to apply to the other raster layers sourceLayer = arcpy.mapping.Layer(r"H:\Desktop\Masterarbeit\test\RESULTATE\lyr_files\Reach Probability.lyr") #Loops through layers in the first data frame in your mxd and #creates a list of Layers starting with Reach_probability: for lyr in arcpy.mapping.ListLayers(mxd, "Reach_probability*", df): #Determines if layer is a raster layer and applies lyr symbology if it is if lyr.isRasterLayer: arcpy.ApplySymbologyFromLayer_management(lyr, sourceLayer) #Saves mxd mxd.save() finally: #Deletes the reference to the mxd from memory (not the actual mxd file) del mxd
... View more
01-01-2013
10:13 AM
|
0
|
0
|
785
|
POST
|
Hi Adrian, The iterator tools are model builder only tools that do not work in Python scripts. In your Python script, you can accomplish the same iteration with a for loop that iterates through a list of all the layers in your map using ListLayers. I will post a code example later. The code you want will be similar to the second example on the ListLayers help page, but your if statement will limit the layers to raster layers. The code inside the if statement will apply symbology to your rasters like the code at the bottom of the Raster Classified Symbology help page. Mel
... View more
12-31-2012
01:03 PM
|
0
|
0
|
785
|
POST
|
What is your specific definition or criteria for a saddle? If you can figure out how you want to define or search for your saddle, you may be able to do this with either. Here are a few questions that may help you define some saddle logic to identify the saddles: Your saddle is the low vertical point in one horizontal direction and the high vertical point in another horizontal direction. - Are you interested in all saddles even if they have very small vertical elevation changes (inches to 1 ft)? - Or what vertical slope needs to be present for you to define that as a saddle? How large does your saddle need to be? Do the slopes meeting at the saddle peak and valley need to cover a distance of one raster cell, 5 cells, or some larger value?
... View more
12-26-2012
05:44 AM
|
0
|
0
|
213
|
POST
|
Thanks Dave. I will have to try that out. George, there is also a summary statistics tool in the statistics toolbox that you might be interested in. http://resources.arcgis.com/en/help/main/10.1/index.html#/Summary_Statistics/00080000001z000000/
... View more
12-26-2012
05:24 AM
|
0
|
0
|
773
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|