POST
|
Hi James, Thanks for posting this. It did find its way to the Python team. We apologize for the mistake. You are correct, the square brackets should be not be used. We will fix this immediately. Sincerely, Python Team
... View more
08-27-2012
03:14 PM
|
0
|
0
|
212
|
POST
|
Thanks Ted. We'll look into this during our documenation review process. Jason
... View more
01-18-2012
07:42 AM
|
0
|
0
|
185
|
POST
|
Ted, Are you able to export this same geodatabase using the wizard in ArcCatalog? Is it possible to get the geodatabase or perhaps, you can bring it to holistic testing next week? Thanks, Jason
... View more
01-18-2012
06:14 AM
|
0
|
0
|
282
|
POST
|
Hi Mark, There are currently no plans for the data access (da) module to support spatial queries. However, for file geodatabases, personal geodatabases, shapefiles, etc., you can use the Select Layer By Location tool. In 10.1 final, you will be able to use a new tool named Make Query Layer which allows you create a query layer from a DBMS table based on an input SQL select statement. The SQL can include a spatial query. This layer can then be used as input to GP tools and supported by the da module. Here is an example of creating a query layer with a SQL spatial query and using it in a tool or in searchcursor. arcpy.MakeQueryLayer_management(r'Database Connections\Connection to pardy.sde', 'CMarkets', """SELECT c.mkt_id, c.shape, c.names FROM cola_markets c WHERE SDO_OVERLAPS(c.shape, SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1,1003,3), SDO_ORDINATE_ARRAY(4,6, 8,8))) = 'TRUE'""", "MKTID")
arcpy.GetCount_managment("CMarkets")
rows = arcpy.da.SearchCursor("CMarkets", "NAMES") Jason
... View more
01-06-2012
12:36 PM
|
0
|
2
|
534
|
POST
|
Hi Patricia, Unfortunately, there is no method available in Python that allows you to alter or update the alias name of a table or feature class. There will be a new method in ArcGIS 10.1 to do this: arcpy.AlterAliasName(table, alias_name)
One alternative (other than using ArcObjects), is save all the layers in the TOC to layer files and use them from that point forward. You can do this right from the Python window in ArcGIS 10. >>> mxd = arcpy.mapping.MapDocument('current') >>> layers = arcpy.mapping.ListLayers(mxd) >>> for layer in layers: ... layer.saveACopy(os.path.join(r'c:\temp', layer.name), "10.0") Jason
... View more
12-15-2011
07:48 AM
|
0
|
0
|
221
|
POST
|
Hi Szymon, Thanks for reporting this. I was able to replicate the behavior you are reporting. I will log an incident for our developer to look into this. As you suggest, turning off the extension and turning it back on, all events work as expected. Jason Pardy Esri
... View more
10-18-2011
01:00 PM
|
0
|
0
|
242
|
POST
|
Hi Szymon, There is no specific shape for point or polygon. To construct the point, you must use onMouseDown or onMouseDownMap. Using the x and y coordindates you can construct the point geometry. pt_geom = arcpy.PointGeometry(arcpy.Point(x, y)) For polygon, we hope to include this for final. For now, you would need to use line and close it off. Here is an example: class LineToPolyTool(object):
"""Implementation for LineToPoly_addin.linetopoly (Tool)"""
def __init__(self):
self.enabled = True
self.cursor = 3
self.shape = "Line"
def onLine(self, line_geometry):
array = arcpy.Array()
part = line_geometry.getPart(0)
for pt in part:
print pt.X, pt.Y
array.add(pt)
array.add(line_geometry.firstPoint)
polygon = arcpy.Polygon(array) I hope this is helpful. Jason Pardy Esri
... View more
10-18-2011
12:25 PM
|
0
|
0
|
239
|
POST
|
Hi Kevin, Unfortunately, this currenly does not work and is not supported. The low-levels of integrating any Python UI framework (including wxPython) with the event loop of the desktop applications is very difficult. It is something we are researching to fix, but the scope of such a project is very big and isn't something that we feel can be done in the 10.1 timeframe. We do hope to support wxPython in the future as the Python UI Framework for hooking into ArcGIS Desktop. Thanks, Jason Pardy Esri
... View more
10-17-2011
02:43 PM
|
0
|
0
|
1211
|
POST
|
This should be in the doc, in a nutshell. Simple. How will this be deployed when 10.1 goes to release, same way, in that it will be a separate download, or will it be included in the install path for desktop. The Python Add-In Wizard will be deployed as a separate download when ArcGIS 10.1 goes to final release. The ArcGIS Desktop help will provide links to the location of the download. ArcGIS 10.1 Beta 1 users can down the Python Add-In Wizard from this location: https://betacommunity.esri.com/files/download.aspx/addin_assistant.zip?d=89348D98298E4EB0B88DC3CB1E04BD70&p=74C6DFC24C1E42D29420D7D05E434F9C&n=F491A36A4E3C4293BA17F1CDA6EF8871&s=E8215C9C468149B3B398D5A558B19596&l=66974DEB93534385A83D793393E1F9F4 Beta 1 users, please refer the Guide Book for Customizing ArcGIS Desktop with Python Add-Ins for help on getting started. http://resourcesbeta.esri.com/en/help/main/10.1/index.html#/What_is_a_Python_add_in/014p00000025000000/
... View more
08-17-2011
01:26 PM
|
0
|
0
|
331
|
POST
|
Rather than letting the parameter for symbology_only default to True, try setting it to False: arcpy.mapping.UpdateLayer(df, updateLayer, sourceLayer, False)
... View more
08-08-2011
07:47 AM
|
0
|
0
|
361
|
POST
|
Oh ok. Try this: 1. Ensure the 'run in process option' in the Script tool properties is checked on. 2. Rather than hard code the path to the mxd, use the current mxd mxd = arcpy.mapping.MapDocument('current') Jason
... View more
08-05-2011
12:38 PM
|
0
|
0
|
1404
|
POST
|
If you are running this script outside the ArcGIS process space, you will need to save the changes or save a copy. You cannot run the script in a Python IDE such as Pythonwin and refresh the current map running in ArcMap--they are separate processes and do not communicate with each other. Your only option if you don't want to save or save a copy is to load your script into the Python window and execute. Hope this helps. If you decide to save or save a copy, please post your results so we know it resolved your issue. Many thanks, Jason
... View more
08-05-2011
12:25 PM
|
0
|
0
|
1404
|
POST
|
I believe all you are missing is to do a save of the mxd. In the Python Window, you see it work after the Refreshes because you have the mxd open. However, running this code outside ArcGIS will required a save of the mxd or save a copy of the mxd. mxd.save() or mxd.saveACopy(r"C:\Project\Project2.mxd")
... View more
08-05-2011
10:50 AM
|
0
|
0
|
1404
|
POST
|
Unfortunately, this is not supported and is documented here: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Exporting_a_model/002w00000031000000/ The best solution is to call your model tool from a Python script: import arcpy arcpy.ImportToolbox(path to the toolbox contain the model tool) arcpy.ModelToolName(parameters)
... View more
05-24-2011
10:16 AM
|
0
|
0
|
384
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|