|
POST
|
You are not doing anything wrong. The tool dialog filters out the OBJECTID field from the list of available fields because it is indexed by default. If you wish to create a composite index using OBJECTID and another field you can use python to execute the tool. When executed via python the tool will allow you to specify this field. For example:
arcpy.AddIndex_management("Database Connections/testDB.sde/russell.TEST.TestPoints","OBJECTID;FIELD1","compositeTest","NON_UNIQUE","NON_ASCENDING")
Hope this helps
... View more
11-21-2013
08:48 AM
|
0
|
0
|
1441
|
|
POST
|
On a semi-related note, in the upcoming 10.2.1 there will be a GP tool (alter field properties) that will allow you to rename a field as well as change the field alias. So if you can wait until the 10.2.1 release and are willing to use geoprocessing this should help you out.
... View more
11-06-2013
06:38 AM
|
0
|
0
|
3438
|
|
POST
|
Hi Karen, This seems like some sort of installation issue. I would suggest contacting Technical Support directly to go through troubleshooting steps with them.
... View more
10-09-2013
03:28 PM
|
0
|
0
|
1053
|
|
POST
|
The functions you are looking for are arcpy.ListUsers and arcpy.DisconnectUser List Connected Users http://resources.arcgis.com/en/help/main/10.2/index.html#//018v00000030000000 Disconnect users: http://resources.arcgis.com/en/help/main/10.2/index.html#//018v00000061000000 The third example for disconnect users shows how to use the list users function with the disconnect users function to disconnect only specific users based on their names. This will work for both application server connections (3-tier) as well as direct connections (2-tier). Russell
... View more
09-05-2013
09:03 AM
|
1
|
0
|
1526
|
|
POST
|
Go into your model properties and check that the name of the model is what you are using. The label is what appears in ArcCatalog when you are browsing. The name is what python uses to find the tool. You can have a name and label that are completely different from one another.
... View more
08-30-2013
01:18 PM
|
0
|
0
|
2133
|
|
POST
|
Check your casing. Python is case sensitive. Double check that the tool name is spelled correctly. If you un-comment out the first tool does it execute successfully?
... View more
08-30-2013
12:39 PM
|
0
|
0
|
2133
|
|
POST
|
Hi Gavin, When you import your toolbox using arcpy.ImportToolbox the models within your toolbox function just like any other tool. Essentially each model becomes a tool. You will then have the ability to use try/except blocks catch any failures. You could also parse messages returned from 'arcpy.getmessages()' if there are specific messages you are interested in investigating.
import arcpy#Import the toolbox containing the models.arcpy.ImportToolbox(r"c:\temp\my_analysis.tbx", "models")#Run each model as though it were a tool#use try/except for finding major failures.#use getmessages to find more specific info.try: arcpy.CustomBufferIntersect_models() msg = arcpy.GetMessages() if msg.lower().find('error 000375'): print "Do something!" else: print "That's not working, do something else!" arcpy.CreateNewFeatures_models() arcpy.MakeSurface_models()except: print 'Oh no! Something went wrong'
When calling the model from a script you do not get granularity at the tool level you just get the entire model. This is what we usually recommend for people who want to do some sort of automated process but do not want to write much Python. The problem with the scripts exported from models is that they are very messy and hard to read. Also you can end up with a lot of redundant code. Hope this helps.
... View more
08-29-2013
12:18 PM
|
0
|
0
|
4383
|
|
POST
|
Hi Mike, What I think is the easiest way to do this is to call each of your models from a script. If all of your models are in a single toolbox this is really easy. This is a much cleaner way to execute the custom functions without having to write any??? complex python. Write a python script that looks like this (sorry for the lame names in the example): import arcpy #Import the toolbox containing the models. arcpy.ImportToolbox(r"c:\temp\toolboxname.tbx", "toolboxAlias") #Run each model as though it were a tool arcpy.ModelName_toolboxAlias() arcpy.Model2Name_toolboxAlias() arcpy.Model3Name_toolboxAlias() In the example above I have a toolbox named 'toolboxname' that stores all of my models. In this toolbox I have three models named ModelName, Model2Name, Model3Name. In the example I have also chosen an alias for my tools. The alias is 'toolboxAlias', the alias is just used to differentiate your tools from other system tools so there are not name collisions. This is similar to some core tools that have a _management or _analysis alias. Each of the models do not take any input parameters hence the (). If one or many inputs were required for these models you would put them between the () brackets (ex: arcpy.ModelName_toolboxAlias('c:\temp\test.gdb\featureclass')) You can then run this very simple script to call your models in sequence. A (slightly) better example might look like this: import arcpy #Import the toolbox containing the models. arcpy.ImportToolbox(r"c:\temp\my_analysis.tbx", "models") #Run each model as though it were a tool arcpy.CustomBufferIntersect_models() arcpy.CreateNewFeatures_models() arcpy.MakeSurface_models()
... View more
08-29-2013
08:26 AM
|
1
|
0
|
4383
|
|
POST
|
Yvo, You should be able to use the relationship class describe object to get the primary/foreign keys and use arcpy search or insert cursors to make the updates to the records. Insert Cursor: http://resources.arcgis.com/en/help/main/10.1/index.html#/InsertCursor/018w0000000t000000/ Search Cursor: http://resources.arcgis.com/en/help/main/10.1/index.html#/SearchCursor/018w00000011000000/
... View more
05-02-2013
09:40 AM
|
0
|
0
|
1996
|
|
POST
|
What James provided above is the correct way to create a relationship class using ArcPy. Providing the primary and foreign keys is what establishes the relationship between the features. You can use the arcpy.describe() function for getting access to various properties of the relationship class. Create Relationship Class: http://resources.arcgis.com/en/help/main/10.1/index.html#//0017000000mn000000 Describe relationship properties: http://resources.arcgis.com/en/help/main/10.1/index.html#/RelationshipClass_properties/018v0000002n000000/
... View more
05-02-2013
06:29 AM
|
0
|
0
|
1996
|
|
POST
|
My script runs into a problem when a check-out replica already exists. Do you know how to do a check if a replica exists, and if it doesn't, create the replica? You can use the arcpy.da.listreplicas() function to list all the replicas objects in a geodatabase. You can use arcpy.exists() to check for the existance of a file geodatabase. ListReplicas http://resources.arcgis.com/en/help/main/10.1/index.html#/ListReplicas/018w00000003000000/ Exists: http://resources.arcgis.com/en/help/main/10.1/index.html#/Exists/018v0000004p000000/
... View more
04-18-2013
08:37 AM
|
0
|
0
|
1909
|
|
POST
|
Chris, The first check box is used to determine what to do if there are edits in the delta tables for the dataset that is being unregistered as versioned. If there are edits in the delta tables that have not been compressed to the base table AND this box is checked the tool will error with the following error message ERROR 000101: The dataset <dataset name> contains edits to some versions. If there are no edits in the delta tables for the dataset and this box is checked the tool will run and will unregister the dataset as versioned. In this case the last parameter is ignored. The second parameter is used to determine what to do if there are edits in the delta tables and the first box is unchecked. When these conditions are met the second parameter allows you to choose to compress edits from the Default version into the business table (checked box) or simply delete the delta tables and you lose any outstanding edits (unchecked). We tried at 10.1 to update the labels on the tool to make this easier to understand as we have received feedback that it is difficult. At 10.1 the labels on these parameters now read as "Do not run if there are edits in the delta tables" and "Compress all edits in the Default version into the base table" instead of "Keep edits" and "Compress Default". Hope this helps,
... View more
03-04-2013
06:29 AM
|
0
|
0
|
1582
|
|
POST
|
This sample script may help: http://www.arcgis.com/home/item.html?id=473c510504f445d5a6d593cf1a7f1133
... View more
02-14-2013
06:59 AM
|
0
|
0
|
1160
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-03-2026 05:49 AM | |
| 1 | 02-05-2026 08:07 AM | |
| 4 | 02-05-2026 08:13 AM | |
| 1 | 02-05-2026 07:48 AM | |
| 1 | 02-02-2026 07:23 AM |
| Online Status |
Offline
|
| Date Last Visited |
3 weeks ago
|