|
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
|
808
|
|
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
|
1164
|
|
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
|
1357
|
|
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
|
1357
|
|
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
|
3878
|
|
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
|
3878
|
|
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
|
1645
|
|
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
|
1645
|
|
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
|
1345
|
|
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
|
1401
|
|
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
|
778
|
|
POST
|
Here is a script that I have used with a little bit more flexibility than using the 'All' keyword. # Import necessary modules. import arcpy, datetime # Set the admin connection -> this user needs to have privilegs to disconnect users. adminConnection = r'Database Connections\dbo@testDB@testServer.sde' # Get a list of connected users. uList = arcpy.ListUsers(adminConnection) # Print the number of connected users count = len(uList) print 'There are currently {0} users connected\n'.format(count) # Exception lists -> these are used to determine machine names or users # which will not be disconnected. Leave blank if there are no exceptions machines = ['devinci','rocky'] users = ['samhill', 'stevepeat', 'stevesmith'] # Get current time. now = datetime.datetime.now() # Get time a week ago weekAgo = now - arcpy.time.EsriTimeDelta(7, 'days') # Iterate through users for u in uList: if u.ConnectionTime < weekAgo: if u.ClientName.lower() in machines: print "Skipping user: {0} on machine: {1}".format(u.Name, u.ClientName) print "Machine name is on exception list.\n" elif u.Name.lower() in users: print "Skipping user: {0} on machine: {1}".format(u.Name, u.ClientName) print "User's name is on exception list.\n" else: try: arcpy.DisconnectUser(adminConnection, u.ID) print "Successfully disconnected user: {0}\n".format(u.Name) except: print arcpy.GetMessages() else: print "User ({0}) connection time did not exceed the set limit.\n".format(u.Name) # Get a list of connected users. uList = arcpy.ListUsers(adminConnection) # Print the number of connected users count = len(uList) print 'There are currently {0} users connected'.format(count) print 'Done'
... View more
02-01-2013
12:31 PM
|
0
|
1
|
2481
|
|
POST
|
This might help too. http://www.arcgis.com/home/item.html?id=d1161bebf2ef46b881b0958957c4325c
... View more
11-15-2012
11:34 AM
|
0
|
0
|
1484
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-10-2025 06:48 AM | |
| 4 | 05-21-2025 08:31 AM | |
| 3 | 05-20-2025 12:14 PM | |
| 1 | 08-29-2013 08:26 AM | |
| 1 | 08-20-2014 11:38 AM |
| Online Status |
Offline
|
| Date Last Visited |
Tuesday
|