|
POST
|
Hi Zack, 1. You will need to update the updateParameters function within the ToolValidator class with the following: def updateParameters(self):
if self.params[0].value:
sr = arcpy.Describe(self.params[0].value).spatialReference
self.params[7].value = sr.name
self.params[7].enabled = 0
return The index value for self.params[7] may be different depending on where you want the input coordinate system to be shown within the tool. 2. Change the parameter's Data Type to 'Feature Layer'. This will allow you to drag and drop, and also provide a dropdown listing the feature classes within ArcMap.
... View more
06-19-2012
04:58 AM
|
0
|
0
|
4317
|
|
POST
|
Hi Richard, Here's an example on how to do this using python: fc = "Boundary"
rows = arcpy.SearchCursor(fc)
for row in rows:
geom = row.shape
if geom.firstPoint.X == geom.lastPoint.X:
print row.OBJECTID
del row, rows It will compare the X coordinate of the first and last point within each line. If they are the same the OBJECTID of the line is printed.
... View more
06-19-2012
03:13 AM
|
0
|
1
|
4169
|
|
POST
|
There is a risk using oracle packages or procedures to create the replication due to the many tables associated with feature datasets/feature classes/tables/geodatabse objects (i.e. geometric networks, topologies, etc). Replication using this method is not supported by ESRI. I'm not quite sure what you mean by a 'network rebuild'. Could you elaborate a little more on this?
... View more
06-19-2012
02:40 AM
|
0
|
0
|
1009
|
|
POST
|
If you are replicating a very large amount of data, you may want to consider using the Register existing data option. If you have a fast method of transferring data between databases, such as a database dump, it may be easier to copy data from one database to another, then go through the Create Replica wizard with the option to register with existing data. This creates the replica versions needed to synchronize changes between the geodatabases but does not go through the lengthy process of copying data since it already exists in both locations. More information can be found here.
... View more
06-18-2012
05:18 AM
|
0
|
0
|
1009
|
|
POST
|
Hi Paul, Execute the Software Authorization wizard under Start > Programs > ArcGIS. Browse to your .prvc file and then complete the wizard. This will populate the keycodes file for you.
... View more
06-15-2012
08:49 AM
|
0
|
0
|
1051
|
|
POST
|
Hi Ben, Can you post the code you are working with? Be sure to wrap it in the CODE tags when posting.
... View more
06-07-2012
03:57 AM
|
0
|
0
|
1680
|
|
POST
|
The bug doesn't state that it will fail for Windows XP SP3. I would try the following: 1. Add the 'Create Replica' tool to a Model Builder and run the model and see if it succeeds 2. If the model succeeds, delete the replica from both databases, and delete the feature class from the Child Geodatabase 3. Export the model to a script (inside Model Builder: Model > Export > To Python Script) 4. Attempt to execute the script If the script fails, I would recommend contacting Tech Support.
... View more
06-06-2012
11:41 AM
|
0
|
0
|
3092
|
|
POST
|
I�??ve opened several layers under the table of contents in ArcMap, but cannot see all of them at the same time. I can zoom to a state of Maryland layer and see it in the workspace. However, the other layers (roads, hydrology, census blocks) in my table of contents are invisible. Zooming to one of the �??invisible�?� layers reveals it and all the other previously invisible layers. This sounds like a projection issue. One or more of your shapefiles/feature classes are in the wrong projection. I would add some reference data to your ArcMap document that you know is in the correct projection. You can find such data at: C:\Program Files (x86)\ArcGIS\Desktop10\Reference Systems I would recommend adding the usstpln83 shapefile. See which of your shapefiles align correctly in the state of maryland. I decided to move on to my next planned task, creating a new shapefile in ArcCatalog, dragging it over to the table of contents in ArcMap, launching the Editor tool and digitizing (drawing) the feature. I was able to create the shapefile and successfully move it to the ArcMap table of contents. However, I cannot edit it!! It�??s sitting in the table of contents but NOT listed as one of the files available for editing in the Editor window. Try creating a new editing template: 1. On the Create Features editing window, click 'Organize Templates' at the top 2. Click New Template 3. Select any layers that are not appearing in the Create Feature editing window So I gave up and decided to clip all the major roads to just those within the state of Maryland so I�??d feel I�??d accomplished something! OMG, I can�??t even clip! In fact NONE of the common geoprocessing tools work. What is the error you are receiving when you try and execute the geoprocessing tool?
... View more
06-06-2012
05:56 AM
|
0
|
0
|
643
|
|
POST
|
Hi Steve, Are you running Windows 7 64-bit? I found a bug regarding this: NIM073906: Cannot run Create Replica as a script on a Windows 7 64-bit machine. One workaround that may help is running the python syntax of the script through the Python window within ArcMap. Running the 'Create Replica' through the Python window or within model builder should not fail. I would also recommend contacting Tech Support to add your customer information to this bug number.
... View more
06-06-2012
04:28 AM
|
0
|
0
|
3092
|
|
POST
|
Hi Matt, It's actually a little tricky to calculate field values from one table to another outside of ArcMap. Here is some sample code that I was able to get to work: import arcpy from arcpy import env env.workspace = r"C:\temp\python\test.gdb" fc = "Airports" table = "Airports__ATTACH" # Add a field to the feature class and calculate the OBJECTIDs to this new field arcpy.AddField_management(fc, "OBJECTID2", "LONG") arcpy.CalculateField_management(fc, "OBJECTID2", "!OBJECTID!", "PYTHON_9.3") # Join the new OBJECTID2 field to the attachment table (original OBJECTID will not join) arcpy.JoinField_management(table, "FK_GUID", fc, "PK_GUID", "OBJECTID2") # Update the REL_OBJECTID field with the OBJECTID2 values rows = arcpy.UpdateCursor(table) for row in rows: row.REL_OBJECTID = row.OBJECTID2 rows.updateRow(row) del row, rows # Delete the OBJECTID2 fields from the feature class and table arcpy.DeleteField_management(fc, "OBJECTID2") arcpy.DeleteField_management(table, "OBJECTID2")
... View more
06-06-2012
04:04 AM
|
0
|
0
|
4392
|
|
POST
|
Hi Holly, How did you create the web map? Did you use the Java/.NET ADF or did you use an API (i.e. Flex, Silverlight, Javascript)?
... View more
06-04-2012
03:20 AM
|
0
|
0
|
1351
|
|
POST
|
Hi Denise, Here is some sample code that should get you started. What you will need to do is use the 'os.walk' command to iterate through all sub-directories. The below code starts at the directory specified with 'env.workspace' and iterates through all of its sub-directories. It will add the polyline file of any DWG it finds. import arcpy, os
from arcpy import env
env.workspace = r"C:\temp\python"
for (path, dirs, files) in os.walk(env.workspace):
for file in files:
# find all DWG files in folder and all subfolders
if ".dwg" in file.lower()[-4:]:
dwg_path = os.path.join(path, file) + "\Polyline"
# set the MXD
mxd = arcpy.mapping.MapDocument("CURRENT")
# set the Dataframe
df = arcpy.mapping.ListDataFrames(mxd,"*")[0]
# create a new layer
newlayer = arcpy.mapping.Layer(dwg_path)
# add the layer to the map
arcpy.mapping.AddLayer(df, newlayer,"AUTO_ARRANGE")
del mxd
... View more
05-16-2012
10:44 AM
|
0
|
0
|
3282
|
|
POST
|
Right-click on 'My Computer' > Properties > Advanced System Settings > Advanced tab. You should see an 'Environment Variables...' button there. Click this and then you will see 'Path' under System Variables. 'C:\Windows\System32' should be listed here. You can test this by simply typing 'agssom' within a command prompt. If usage variables are returned, then you are good to go. Also, be sure you are refreshing the GIS Server connection in the Catalog window to see that the service has been stopped.
... View more
05-16-2012
07:34 AM
|
1
|
0
|
2324
|
|
POST
|
Hi Justin, You will not need the full path of the executable since it's copied to the System32 directory. Also, a couple other notes: -the exe is 'AGSSOM.exe', you had 'ArcSOM.exe' -when specifying 'r' before a path, you will just need to use one '\' between directories Try the following instead: import os
# variables
server = "VULCAN"
command = "-x" # use -x for stop
service = "Narcotics"
# use AGSSOM.exe to start map service from command line
commandLine = "agssom " + server + " " + command + " " + service
os.system(commandLine)
print "Finished" Also, be sure that 'C:\Windows\System32' is referenced in your PATH environment variable.
... View more
05-16-2012
06:56 AM
|
2
|
0
|
2324
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 3 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
|