|
POST
|
GetInstallInfo http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-functions/getinstallinfo.htm
... View more
11-24-2015
04:07 PM
|
1
|
6
|
2791
|
|
POST
|
You should only need a Standard license if you're using one of the following functionalities: Local locators (geocoding) Local routing Local editing (such as geodatabase editing) Local geodatabase sync operations with an upload Local Server License your app https://developers.arcgis.com/net/desktop/guide/license-your-app.htm
... View more
11-24-2015
08:30 AM
|
0
|
1
|
708
|
|
POST
|
There are quite a few errors in your code. I've outline them below and also included a copy of what the correct code should look like. I'm assuming that you're writing this for a script tool. import arcpy
'''
You'd use Parameter if you needed to create one. In this case you need to pull
a value from the tool.
'''
# Get table parameter
param1 = arcpy.Parameter(displayname="Roads")
'''
open is used to open flat files. This is not going to work with opening a
file geodatabase. The software will handle opening this for you
'''
# Open table to edit
GeoDBLocation = open (param1, 'r+')
'''
You're using a variable below called fields and it hasn't been defined. Python
also doesn't support indexing with words.
'''
Fields["LABEL", "SYMBOL", "SYM_TYPE"]
# Add data
cur = arcpy.UpdateCursor(GeoDBLocation)
'''
python is a case sensitive languague. The words for, if, elif, and else should
be lowercase. Also, the getValue method needs a capital V.
'''
For row in cur:
If row.getvalue("LABEL") == "H":
row.setvalue("SYMBOL", "3.01")
row.setvalue("SYM_TYPE", "S")
Elif row.getvalue("LABEL") == "L":
row.setvalue("SYMBOL", "3.02")
row.setvalue("SYM_TYPE", "F")
Else:
row.setvalue("SYMBOL", "0.01")
row.setvalue("SYM_TYPE", "O")
cursor.updateRow(row)
#Delete cursor
del row
del cur
import arcpy
# Get table parameter
param1 = arcpy.GetParameterAsText(0)
fields = ["LABEL", "SYMBOL", "SYM_TYPE"]
cur = arcpy.UpdateCursor(param1)
for row in cur:
value = row.getValue("LABEL")
if value == "H":
row.setValue("SYMBOL", 3.01)
row.setValue("SYM_TYPE", "S")
elif value == "L":
row.setValue("SYMBOL", 3.02)
row.setValue("SYM_TYPE", "F")
else:
row.setValue("SYMBOL", 0.01)
row.setValue("SYM_TYPE", "O")
del row
del cur
... View more
11-20-2015
02:07 PM
|
2
|
1
|
1850
|
|
POST
|
This is probably going to be due to the size of the display for the map. When you have ArcMap open the map will possibly be a different size than when you're accessing it remotely. As the size of the map being rendered increases or decreases the scale will change. To show this I've taken screenshots of the sample map document on my machine. Scale at full screen Scale at half screen
... View more
11-20-2015
11:35 AM
|
0
|
0
|
1736
|
|
POST
|
This page shows how to find the extensions and check their state. So far I haven't seen any events that are fired when an extension's state is changed. How to use extensions http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#//00010000033w000000
... View more
11-20-2015
10:39 AM
|
0
|
1
|
802
|
|
POST
|
Editor extensions will not display in the Extensions list of ArcMap. For example, the Editor in ArcMap is actually an extension named "Esri Object Editor". If you open the Extensions dialog you'll see that this name doesn't appear there. An editor extension essentially hooks into this extension to enable/disable itself. I would suggest two workflows if you're needing to be able to turn this extension on/off. Use a regular Extension instead of an Editor Extension. Both are implemented in the same manner (i.e. when the application or editor starts you wire your code into events where you need to implement your logic). With the regular Extension you'd be able to expose your custom extension in the ExtensionDialog. This would allow users to be able to enable/disable your extension from the ArcMap UI. You could also use the link I posted before to automate this process by wiring into other events throughout the system. How to use extensions http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#//00010000033w000000 Use an Editor Extension. This extension will be treated as a JIT extension. You'd need to cycle through the JITExtensionManager to hook into your edit extension. Once you've located it you could call its OnStartup or OnShutdown methods to essentially turn your logic on or off. How to find an extension http://edndoc.esri.com/arcobjects/9.2/net/ee7dc655-6908-4c1a-bc30-374903916520.htm I only had a few minutes to write this up...so below is what I was able to create and test. This appears to be working for me so far. You'd need to implement the logic to control when to call Startup or Shutdown and you'd also need to setup the needed wiring within both of these methods.
... View more
11-20-2015
10:30 AM
|
0
|
0
|
1353
|
|
POST
|
Have you tried hooking into the extension and setting its state? How to use extensions http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#//00010000033w000000 You can get the guid for the extension by calling ThisAddIn.IDs.<NameOfYourExtensionClass> within the addin code where the extension lives.
... View more
11-19-2015
04:48 PM
|
0
|
2
|
1353
|
|
POST
|
I can't think of a sample off the top of my head that would show exactly what you're wanting, but I can point you to a couple of pages that would help you put this together. Exporting Data Driven Pages http://desktop.arcgis.com/en/desktop/latest/map/page-layouts/exporting-data-driven-pages.htm Start by checking out the example at the bottom of the above page. You'll see in this example that they're using python to iterate through each data driven page and export it to a single png image. You'd do something similar to export each page to a PDF. Within the iteration logic of the above step, you'll want to pull sites from the Row object returned from the pageRow object of the DataDrivenPages class. DataDrivenPages class http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-mapping/datadrivenpages-class.htm If you put all of your coordinates within the same row you could parse them from the row object and then you'd use the panToExtent or zoomToSelectedFeatures method of the DataFrame class to move your additional dataframes to the needed location. Note: The selection approach would require that you select the geometry within the map, zoom to it, and clear the selection. If you have your data in different rows you can just create a search cursor against the feature class and use the site id as a filter. DataFrame class http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-mapping/dataframe-class.htm Accessing data using cursors http://desktop.arcgis.com/en/desktop/latest/analyze/python/data-access-using-cursors.htm
... View more
11-19-2015
10:26 AM
|
2
|
1
|
960
|
|
POST
|
Hi Rex, I believe the following thread may give you more insight on this topic. Why can't I buy one Runtime license?
... View more
11-19-2015
05:20 AM
|
1
|
0
|
562
|
|
POST
|
I'm guessing your problem is with workspaces. In the call to the CopyFeatures tool you're specifying the name of the output class without the directory. Try giving the following a shot. I'm assuming you want to create shapefiles, so I added the extension to the name of the output file. I'd assume in arcmap that everything would output to the default.gdb. import arcpy
import os
tree = r"M:\Temp\ArcPy\Tree.shp"
arcpy.env.overwriteOutput = True
arcpy.env.workspace = os.path.dirname(tree)
arcpy.management.MakeFeatureLayer_management(tree, "Tree")
arcpy.SelectLayerByAttribute_management("Tree","NEW_SELECTION",'"Diameter" >=50')
arcpy.CopyFeatures_management ("Tree","Trees50DBH.shp")
arcpy.FeatureClassToFeatureClass_conversion("TreesGreater50DBH", r"M:\Temp\ArcPy","Tree50DBH.shp")
... View more
11-18-2015
09:06 AM
|
1
|
1
|
863
|
|
POST
|
Have you tried creating a model without the iterator logic? If you were to show a screenshot of a working model without the Iterator or provide a detailed descriptions of the tools you're using to manually accomplish this workflow we'd be better able to assist you with question.
... View more
11-17-2015
01:23 PM
|
1
|
0
|
578
|
|
POST
|
What do you get if you run the following command? arcpy.Exists(r"C:\Users\Marcel\Documents\ArcGIS\scratch\unified.gdb\feature21")
... View more
11-17-2015
01:20 PM
|
1
|
1
|
5660
|
|
POST
|
1. Are you able to navigate to add this feature class manually in ArcMap? 2. If yes, could you show me the full path to the data?
... View more
11-16-2015
03:44 PM
|
0
|
3
|
5660
|
|
POST
|
Could you provide an example of what the resulting lat/long would look like?
... View more
11-16-2015
02:18 PM
|
0
|
1
|
2491
|
|
POST
|
Give this a shot. import arcpy
unknown = arcpy.SpatialReference()
unknown.loadFromString(u'{B286C06B-0879-11D2-AACA-00C04FA33C20};-450359962737.05 -450359962737.05 10000;#;#;0.001;#;#;IsHighPrecision')
arcpy.MakeXYEventLayer_management(r'C:\Path\To\DATA.csv', 'x_coord', 'y_coord', 'LayerName', unknown)
... View more
11-16-2015
09:00 AM
|
1
|
5
|
3212
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-19-2016 04:45 AM | |
| 1 | 09-24-2015 06:45 AM | |
| 1 | 09-15-2015 10:49 AM | |
| 1 | 10-12-2015 03:07 PM | |
| 1 | 11-25-2015 09:10 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|