|
POST
|
If you install 10.1 SP1, you can set the server to block all data copying. Check out this: http://resources.arcgis.com/en/help/main/10.1/#/Example_Prevent_data_copying_at_publish_time/01540000061p000000/ This might help your issue. To do this without python, you can follow these instructions: http://resources.arcgis.com/en/help/main/10.1/#/Disabling_automatic_data_copying_when_publishing_to_the_server/01540000060n000000/
... View more
01-04-2013
04:20 AM
|
0
|
0
|
1210
|
|
POST
|
Sorry, you've totally lost me! Which part are you lost on?
... View more
12-19-2012
08:31 AM
|
0
|
0
|
2033
|
|
POST
|
How did you register the sde connection (There are 2 ways)? Do you have the associated folders registered as well? If you do the same function via a python tool, not a model, do you see the same results? Thanks
... View more
12-19-2012
08:29 AM
|
0
|
0
|
1779
|
|
POST
|
You can try this:
# your code
iQuery = ' "Name" = \'Joe Blogs\' '
print iQuery
# modified code
print "\"%s\" = '%s'" % ("Name", "Joe Blogs")
You can substitute the Name and Value with a variable to make this more dynamic. I would also look at the AddFieldDelimiters() in arcpy to ensure every field is formatted correctly.
... View more
12-19-2012
07:55 AM
|
0
|
0
|
2033
|
|
POST
|
Using the code box in field calculator, you can subtract two python datatime objects from each other. For the code block use something like this: def dateDiff(date): from datetime import datetime return int((datetime.now( ) - datetime.strptime(date,"%m/%d/%Y")).days/365.2425) In the expression just enter in the name the following: dateDiff( !DOB! ) Where field DOB is a date field.
... View more
12-19-2012
07:43 AM
|
0
|
0
|
1448
|
|
POST
|
Did you register your sde connection with server? That can cause data to copy.
... View more
12-19-2012
07:22 AM
|
0
|
0
|
1779
|
|
POST
|
Try putting commas after each number. My code worked then.
... View more
12-12-2012
01:18 AM
|
0
|
0
|
1570
|
|
POST
|
Your list syntax is incorrect. You need to use commas between values. You can find out about type formatting at python.org. Thanks Andrew
... View more
12-11-2012
06:33 AM
|
0
|
0
|
1570
|
|
POST
|
You can find a value positions by doing the following:
itemindex=numpy.where(array==item)
Then change your values. You can find the max value by doing the following:
>>> from numpy import *
>>> a = array([10,20,30])
>>> a.max()
30
>>> a = array([[10,50,30],[60,20,40]])
>>> a.max()
60
Hope this helps. You can find more information about numpy by going to the scipy.org site.
... View more
12-07-2012
03:27 AM
|
0
|
0
|
1570
|
|
POST
|
There are many ways to do this, but have you just tried deleting the old feature class and copying the new one in? You can also use insert cursors to insert new rows from your source db to your destination db. Hope this helps.
... View more
12-06-2012
05:53 AM
|
0
|
0
|
1790
|
|
POST
|
You cannot change a symbol's color using RGB values at 10.1 or 10.0 using python. What you could do is write a C/C++ function that calls ArcObject COM library and then use python's ctype module to call you DLL. Andrew
... View more
11-02-2012
03:19 AM
|
0
|
0
|
483
|
|
POST
|
James, At 10.1, you can create message boxes using Python-Addins and the pythonaddin module. Check out: http://resources.arcgis.com/en/help/main/10.1/index.html#//014p00000025000000 I think a python extension might meet your needs. Just pick the correct event to listen to, and place your logic under that event. It sounds like the event itemReordered(self, reordered_item, new_index) might be what you are looking for.
... class init and stuff
def itemReordered(self, reordered_item, new_index):
pythonaddins.MessageBox('layer moved', 'INFO', 0)
Hope this helps.
... View more
10-22-2012
04:15 AM
|
0
|
0
|
509
|
|
POST
|
The .pyt files need to be placed in the install folder of the python add-in, and the makeaddin.py file needs to be re-run. After that, you can then re-install the add-in by double clicking on the file. Also, ensure that you close and restart arcmap or catalog. Andrew
... View more
10-17-2012
09:38 AM
|
0
|
0
|
1408
|
|
POST
|
You need to call the class name for a .pyt. So I have a python tool called 'Tool', so I pass in Tool to the name parameter.
relPath = os.path.dirname(__file__)
pyt = relPath + os.sep + "customToolbox.pyt"
pythonaddins.GPToolDialog(pyt, "Tool") # Tool is the class name
Also, ensure that the .pyt is in the add-in file. You can check that by renaming the extension .zip and examining the contents. See http://resources.arcgis.com/en/help/main/10.1/index.html#//014p00000021000000 for more information.
... View more
10-17-2012
07:44 AM
|
0
|
0
|
1408
|
|
POST
|
You need to have the 3rd party module installed on your server, and you need to ensure it's the 64-bit version. ArcGIS Server using python 2.7 64-bit where as the desktop version uses the 32-bit version. See: http://blogs.esri.com/esri/arcgis/2012/09/06/a-simple-approach-for-including-3rd-party-python-libraries-with-your-scripts/ for some help with this issue.
... View more
10-05-2012
03:23 AM
|
0
|
0
|
1227
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-24-2017 05:56 AM | |
| 1 | 03-28-2018 03:28 AM | |
| 1 | 07-24-2017 05:39 AM | |
| 1 | 06-01-2016 03:48 AM | |
| 1 | 01-27-2016 02:53 AM |
| Online Status |
Offline
|
| Date Last Visited |
3 weeks ago
|