|
POST
|
1) What is the difference between what I did Even though you set the data type to Layer, this will not create the Layer object. In order to call any methods for a layer, you will first need to create the object. Also, when you use arcpy.GetParameterAsText, the first parameter is always 0 instead of 1. 2) for df = mapping.ListDataFrames(mxd)[0], what does the [0] indicate? The arcpy.mapping.ListDataFrames function returns a list. The [0] indicates to use the first value in the list. Even if you only have one data frame in your MXD, you will still need to indicate the index value for the list object. 3) why del mxd? This will release any locks on the MXD.
... View more
12-17-2012
02:08 AM
|
0
|
0
|
1756
|
|
POST
|
Hi Marc, The Upgrade Geodatabase too will be the best approach. This tool allows you to maintain all of your geodatabase objects such as domains, subtypes, relationship classes, etc. Also, if you are using an SDE geodatabse, the Upgrade Geodatabase tool will maintain all of your database users, groups, privileges, etc.
... View more
12-14-2012
10:24 AM
|
0
|
0
|
1182
|
|
POST
|
Hi Ghassan, An ArcSDE service, also known as an ArcSDE application server or a three-tiered architecture, conveys spatial data between GIS applications and a geodatabase. With an ArcSDE service, a gsrvr process is created on the SDE server for each client connection. A direct connection is recommended. The direct-connect architecture moves ArcSDE functionality to the desktop. This removes the ArcSDE load from the server and allows additional resources to be freed up for the DBMS, which means you get better scalability on the database server. Direct connections can be faster if the server is heavily used, because processing takes place on the client machine. Rather than having to process the information on the server, which may be responding to requests from numerous other users at the same time, and send the information back to the client across the network, the client computer is typically only processing a few tasks at a time. One scenario where you may want to use an ArcSDE application server connection is if your desktop machine does not have enough resources to handle the ArcSDE processes.
... View more
12-14-2012
08:43 AM
|
0
|
0
|
1275
|
|
POST
|
Hi Jose, I noticed you have the DynamicUrl specified twice. Is your service drawing and the legend not displaying, or is your service not drawing as well as the legend?
... View more
12-14-2012
05:37 AM
|
0
|
0
|
1154
|
|
POST
|
Hi Ganesh, I haven't been able to get the intellisense to work for HTML files, but I have for Javascript files by copying the attached 'dojo.1.6.0.sdocml' to the project.
... View more
12-14-2012
04:15 AM
|
0
|
0
|
955
|
|
POST
|
Hi Amelie, I was able to get the script to work in 10.1. A couple things to note are the way the parameters are set up for the script. For GetParameterAsText(0), make sure this is set to a data type of Feature Class or Shapefile. If this is set to 'Feature Layer' and the user click's the drop down to choose a layer within the MXD, the Copy_management function will fail. Also, be sure that you are copying to the same data type. If GetParameterAsText(0) is a shapefile, you will need to copy to a shapefile. You cannot copy to different workspace types (i.e. shapefile to feature class). For GetParameterAsText(5), if this is set to a data type of Feature Class or Shapefile within the script's Parameter tab you will need to update the line: Final_Output_shp = Output_Workspace + "\\" + arcpy.GetParameterAsText(5) to: Final_Output_shp = arcpy.GetParameterAsText(5)
... View more
12-14-2012
02:41 AM
|
0
|
0
|
951
|
|
POST
|
You will first need to create a Layer object so you can call the 'getSelectedExtent()' method. Ex: import arcpy
from arcpy import mapping
mxd = mapping.MapDocument("CURRENT")
df = mapping.ListDataFrames(mxd)[0]
lyr = mapping.Layer(arcpy.GetParameterAsText(0))
df.extent = lyr.getSelectedExtent()
del mxd
... View more
12-14-2012
01:58 AM
|
0
|
0
|
1756
|
|
POST
|
Hi Gareth, What version of ArcGIS (including Service Packs) are you running? I was unable to reproduce this using ArcGIS 10.1 SP1.
... View more
12-13-2012
11:44 AM
|
0
|
0
|
1723
|
|
POST
|
I was able to reproduce the same behavior with ArcGIS Desktop 10 SP 5. This appears to be resolved at 10.1. I would recommend following up with Tech Support so they can log this bug, attach your customer information to the bug, and offer any workarounds.
... View more
12-13-2012
11:40 AM
|
0
|
0
|
5327
|
|
POST
|
What version of ArcGIS Desktop (including Service Packs) are you using?
... View more
12-13-2012
11:06 AM
|
0
|
0
|
4440
|
|
POST
|
Right-click on your mosaic dataset > Modify > Repair. Can you send a screen shot of this?
... View more
12-13-2012
10:41 AM
|
0
|
0
|
4440
|
|
POST
|
Hi Vikram, The Copy_management will work. When you initially loaded the rasters into the mosaic dataset, did you use UNC paths? If not, and you copy the mosaic dataset to another server, the mosaic dataset will not be able to find the rasters. You can repair the mosaic dataset paths using the Repair Mosaic Dataset Paths tool and specify a UNC path.
... View more
12-13-2012
10:16 AM
|
0
|
0
|
4440
|
|
POST
|
Hi Xiankun, You will want to create a global variable and then pass that to the Button class. Here is an example: import arcpy
import pythonaddins
class ComboBoxClass(object):
"""Implementation for ComboBox_addin.combobox (ComboBox)"""
def __init__(self):
self.editable = True
self.enabled = True
self.width = 'WWWWWWWW'
self.dropdownWidth = 'WWWWWWW'
def onFocus(self, focused):
if focused:
self.mxd = arcpy.mapping.MapDocument('current')
layers = arcpy.mapping.ListLayers(self.mxd)
self.items = []
for layer in layers:
self.items.append(layer.name)
def onSelChange(self, selection):
global fc
fc = arcpy.mapping.ListLayers(self.mxd, selection)[0]
class ButtonClass(object):
"""Implementation for ComboBox_addin.button (Button)"""
def __init__(self):
self.enabled = True
self.checked = False
def onClick(self):
print fc On the 'onSelChange' function within the ComboBoxClass I declared 'fc' as a global variable, so now I can use this in the ButtonClass. The above code simply prints the selected layer in the combo box to the python window in ArcMap when the button is clicked.
... View more
12-13-2012
09:24 AM
|
0
|
0
|
2142
|
|
POST
|
Try creating a new feature class in another File Geodatabase and then use the Simple Data Loader to load data from the corrupt feature class to this one.
... View more
12-13-2012
04:45 AM
|
0
|
0
|
1623
|
|
POST
|
Is there a way to update the attributes, not geometry, without user clicking on map? My service request system needs a lot of editing(follow up), I need an interface for users to just query that service request id, then updates data. At this time we do not need map. Currently, we can only edit by clicking on the feature layer, bring up infowindow, and applyedits. It is time-consuming and slow. I am thinking about to query the SQLExpress database, but when I open the tables in SQLExpress, the data is not synchronized with the ArcMap data. I am stuck here. Who can help? Many Thanks. If you want to go the route of querying the SQL Express database, take a look at creating a versioned view. They allow you to read or edit versioned data in a geodatabase table or feature class using SQL. Here is more some more information: http://resources.arcgis.com/en/help/main/10.1/index.html#//006z000000vp000000
... View more
12-12-2012
09:49 AM
|
0
|
0
|
2378
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 4 weeks ago | |
| 4 | 05-07-2020 05:14 PM | |
| 1 | 03-25-2026 04:16 AM | |
| 1 | 03-16-2026 01:00 PM | |
| 1 | 12-22-2025 10:39 AM |
| Online Status |
Offline
|
| Date Last Visited |
Friday
|