|
POST
|
Sometimes I use the python window to do something quick and dirty. You can also try things in the Python windows and copy and paste it into the editor of PyScripter to create something more enhanced. I do prefer coding directly in PyScripter since it is much easier to change things on lines written before, while in the Python window you write a single line, execute it and code the next line. I also execute the code directly from PyScripter (as do most people). The other advantage of coding in and IDE like PyScripter is that your syntax is directly checked and you easily save what you are writing. When you create a script in PyScripter you can easily change hard coded variables into parameters and create a toolbox script that you can run in ArcMap and share with others. The other people don't need any coding experience, since they see a tool just like the ones provided by Esri.
... View more
01-25-2015
11:45 AM
|
2
|
5
|
1980
|
|
POST
|
... or use the Dijkstra algorithm (if you don't have Network Analyst): Finding the shortest route using Dijkstra's algorithm
... View more
01-25-2015
10:07 AM
|
2
|
0
|
2729
|
|
POST
|
How about creating the ZIP and provide the url to the client: ArcGIS Help (10.2, 10.2.1, and 10.2.2)
... View more
01-25-2015
10:05 AM
|
0
|
1
|
954
|
|
POST
|
The point is that creating the mxd object inside the Python window can be done using the "CURRENT" keyword. In a standalone environment (as is PyScripter) you cannot use that keyword. You will have to specify the path to the mxd document. Please read: ArcGIS Help (10.2, 10.2.1, and 10.2.2)
... View more
01-25-2015
10:01 AM
|
0
|
0
|
1980
|
|
POST
|
Thanx Joshua Bixby for the addition. I think I have seen your comment before. Good to know. So delete the cursor objects for now, but (believing that the issue will be resolved) the with statement will be the way to go (in a near future)...
... View more
01-25-2015
09:59 AM
|
1
|
0
|
4707
|
|
POST
|
Just remember the suggestion by Francisco Girón Gesteira (Re: Python error question ) If you are able to install Pyscripter set up the options to read arcpy help and perform code completion with it. Just add arcpy to the special packages line under code completion in IDE options This provides help during the edition of code. What you need to bare in mind is that PyScripter is not the same as the Python window in ArcMap. The Python window is aware of the layers available in the TOC of ArcMap. PyScripter is not. You will have to write them yourself (you won't be able to select them from a list of options). What I normally do is have the online Help open and check the syntax and example: ArcGIS Help (10.2, 10.2.1, and 10.2.2)
... View more
01-25-2015
09:30 AM
|
0
|
3
|
1980
|
|
POST
|
Did you look at this post: Re: Hello everybody I need some help about python scripting to create a square buffer around points feature class ? It contains the code you are looking for. You only need to include the parameters so you can use it as a Tool...
... View more
01-24-2015
05:09 PM
|
3
|
0
|
4707
|
|
POST
|
You need to be more specific. You posted this thread in the developers space, but this has more sub places/spaces: Developers And those have more subspaces too. This will attract a more specific audience that may help you better. At this point it is unclear if you want to develop a desktop, native app or web solution and there is no information on the version of the software you are using nor details on the rules you want to apply for snapping the lines. Maybe include a screenshot (or better sample data) representing the problem. That might be a good addition.
... View more
01-24-2015
04:25 PM
|
0
|
6
|
1919
|
|
POST
|
That is true... I don't think it is a valid layer inside ArcScene. If I create the layer in ArcMap and "Paste" it in ArcScene I get an error message "ArcScene cannot add this layer". If I change the symbology into dot density inside ArcScene it allows it, but it simply doesn't display. The nice thing is, if I copy and paste the layer from inside ArcScene it also shows the same message.
... View more
01-24-2015
04:10 PM
|
0
|
0
|
923
|
|
POST
|
is this a duplicate of arcgis desktop search tool not workiing ?
... View more
01-24-2015
03:41 PM
|
0
|
1
|
858
|
|
POST
|
In addition a few comments on your code: to split the path from the file name you can use os.path.split it is better to use a "with" statement for you cursor, this will clear it from memory after the cursor finishes when you create the polygon, it is better to provide the spatial reference from the input points, otherwise you will be creating a featureclass without coordinate system After the cursor you first copy the square buffers into a new featureclass for which you do not specify the path. Since you have not set the arcpy.env.workspace you are not guiding where it will be created Next you create an empty featureclass and start an insert cursor on it. The point is that you are looping through the features in an empty featureclass which has 0 features,,, In case it would have been a valid cursor with features, the index to the height fields would be wrong (is 5, not 4). Some more tips and examples can be found here: Some Python Snippets
... View more
01-24-2015
03:37 PM
|
1
|
4
|
4707
|
|
POST
|
You can find a script that does this here: Re: Hello everybody I need some help about python scripting to create a square buffer around points feature class ? Another suggestion; When posting code please use syntax highlighting. Your can read how to do this here: Posting Code blocks in the new GeoNet
... View more
01-24-2015
03:18 PM
|
1
|
7
|
4707
|
|
POST
|
The search is working just fine in ArcMap 10.2.2.3552 on Windows 8.1. Support for XP ended April last year. Might be wise to consider updating the os...
... View more
01-24-2015
01:14 PM
|
1
|
0
|
1143
|
|
POST
|
Basically, you download the tool to a location on disk. Unzip the file. Open you existing model . Next navigate with the Catalog window to the location of the toolbox you just downloaded and unzipped. Drag the script on yout model window. It will appear with white colors and unconnected. Now double click on the script tool "SRTM Correction Tree Offsets". In the dialog you will be able to select the intermediate results and inputs your are creating in your model: Select the input rasters and specify the output result. When you click OK, you will see the result in the model: Connect the output of the script tool to other processes in case necessary. Please remember that in case the question has been answered, to mark the post that answered your question as "Correct Answer". In case you feel that other posts were Helpful you can mark them as such.
... View more
01-23-2015
06:09 PM
|
2
|
10
|
5931
|
|
POST
|
I think it is still attached to my post: https://community.esri.com/servlet/JiveServlet/download/449840-112314/toolbox.zip If you can't download it I will upload it again.
... View more
01-23-2015
03:01 PM
|
1
|
12
|
2163
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-09-2020 09:26 AM | |
| 6 | 12-20-2019 08:41 AM | |
| 1 | 01-21-2020 07:21 AM | |
| 2 | 01-30-2020 12:46 PM | |
| 1 | 05-30-2019 08:24 AM |
| Online Status |
Offline
|
| Date Last Visited |
4 weeks ago
|