Creating new shapefile based on its attributes with python
I have a shapefile which has an attribute year. I used to generally copy and paste these features in the dataframe and then using the definition query just show polygons which were established before...
View Articlelayer description property in python and arcgis runtime
Hello, Because layer time info is readonly from Python, I cannot store my dynamic time information on the layer. To work around that problem, I would like to write a string that set the layer time...
View ArticleMake new shapfile based on attributes of an existing shapefile
Hi All, In my last post I had an issue where I wanted to create multiple shapefiles based on only one attribute field(years). How to do it was answered in that post. I want to make that tool more...
View Articlesuperimposing vector and raster data
I have created a Python code that uses: a. a grid file of water depth values in a region (Every cell is 10x10 m) and b. a polygon shapefile of land use information Generally the code reads the depth...
View Articleproject with python script executable temporal evolution in ArcMap
I have to do a project that consists in developing a function / script that can be used in ARCGIS and allows me to visualize the evolution of a temporal variables. I have a personal database with 1...
View ArticleKind of a silly question, but it does bug me
Whenever I write/run python scripts I like to have some text confirmations of various steps along the way. The irritating thing is that the Python Window doesn't seem to scroll with the text that the...
View Articletext property of the text element equal to the value from row in attribute field
In ArcMap 10.0, is it possible to access the attributes from a layer to populate the text property of text elements in the map document. Or do you have to be using data driven pages? I'm trying to do...
View ArticleNeed help to optimize my code
I have a python script which runs fine but takes far too long to run so I'm hoping some of the more experienced python coders can offer suggestions about where I can be more efficient. The script I've...
View ArticleMulti Layer definition Queries
I am working on a project to secure new planning permissions (permits) for a race track. One of the key issues is noise management. Working in data view I would like to be able to view a number of...
View Articleproblems with distanceTo from a point geometry to a new polyline
I'm trying to call distanceTo from a PointGeometry to a Polyine and am running into trouble whenever the polyline is one I just cooked up. Any pointer on what I'm doing incorrectly would be welcome....
View ArticlePublishing PYT with a string pointing to an SDE file on disk crashes ArcCatalog
Hello all, I have encountered a new problem. Consider the code snippet below. This code can be dropped into any Python Toolbox (*.pyt) in place of the execute() function. All it is doing is assigning a...
View ArticleHelp with linking a VBA script and Python Script
I am writing a program that calls up a form when a certain mxd is opened, user answers questions and then another mxd is opened. How do I write in VBA to open the form at the beginning and then what is...
View Articlesaving/disk space error
This error has been plaguing my final project for weeks and I really need a solution to it. I am using the code below. It only works when the map is not open. When it is open, I get the following...
View ArticleCalculating M Values for each vertex in the line
All , I want to calculate the m value for each vertex in the line .. Currently I am calculating the m Value based on the distance between the current point and its previous point and storing it .. Is...
View Articlepython code in modelbuilder using Calculate Value
Hi, I'm attempting to check for the existence of a shapefile if it does not exist, an alternate dummy shapefile is returned in its place. I'm using ArcGIS 10.1 Modelbuilder and specifically the...
View ArticleReg : Create Route Tool
All , I would like to know how the Measure values are calculated for the pipeline features using the Create Route Tool . Also Whats the difference between Length and Length 3d from the SHAPE Field .....
View ArticleUsing Python to Change Representation Rules
We have developed a script that will apply a .lyr file to a feature class. This layer file contains representation rules which are added to this feature class. The script will then change the rule IDs...
View ArticleTransfer code to move into Python from ArcObjects!!
I started my code in ArcObjects because I needed a form, now I need to move to Python when the DrawMap or Cancel button is pushed. I think the code reads as cboDistrict.AddItem ("Yoakum") End Sub Dim...
View ArticleCustom Error Handler
I am a novice at programming but have been successful at writing some python code. I am trying to write a custom error handler and have the error msg displayed in the in tool's process dialog box....
View ArticleHow do you write a function that includes code completion like arcpy functions?
I have a few functions for sets of tasks I do routinely. I'd like to have the dropdown of all feature classes in my document pop-up in the python command-line window like when I use a built in arcpy...
View Article