ArcPy and File Geodatabase Character Encoding
I have a JSON file containing special characters, which can be represented in Unicode. However, as soon as I export that JSON file to a file geodatabase using arcpy, the special characters all “break,”...
View ArticleData Driven Pages ExportToAI Resolution syntax?
I’m fairly novice with code. I am trying to do a simple data driven pages export to .ai using arcpy. I need the resolution down to 150 DPI. Line 4 brings up parsing errSyntax Error: Invalid Syntax. I...
View ArticlePython Add-In Dialog with Textboxes in ArcPy?
With Python Add-In Wizard I created a ButtonTool with which I: click in the map get the coordinates of the mouseclick-location in a dialog with textboxes I want to receive the coordinates in a textbox...
View ArticleArcPy combination of different featurelayers in Combox
I developed a Combox which: combines values from different featurelayers the User can select an ID or activitycode (acode) the active view zooms to the object (biotop or Protected Area) The Combobox...
View ArticleIssue with arcpy.MakeFeatureLayer_management in tool
I have created a python toolbox that creates separate layers based on unique field values within a feature layer. For some reason arcpy.MakeFeatureLayer_management will create the layer but will not...
View ArticleMigrating ArcGIS for Desktop script to ArcGIS Pro? [closed]
Recently I’ve been considering switching my department over to ArcGIS Pro in an effort to stay ahead in the ever-advancing world of GIS software. Currently we run ArcGIS 10.3, and have many daily...
View ArticleForcing Python Toolbox tool to break loop and do cleanup when user clicks...
I am writing a Python tool that perform heavy tasks in a loop. When the user clicks “Close” I want to break the loop, perform some cleanup, and then finish. Consider this example tool that counts down...
View ArticleDelete tables from SDE including archive-tables
I want to delete some tables from my SDE as well as some featureclasses located in a feature-dataset. As some of those tables and featureClasses are enabled for archiving I get both the base-table/FC...
View ArticleError adding row – sequence size must match size of row
I have this table with one row timestamp_pretty 3.1.2014 9:13 timestamp 1,38874E+12 msgid 3 targetType A mmsi 205533000 lat 53.4346 long 14.580546 posacc 0 sog 0 cog 319.5 shipType CARGO dimBow 68...
View ArticleWhat is wrong with this code? my query is not updated with the new value...
query='"depth">1700 AND "depth"<1750' with arcpy.da.UpdateCursor(out_layer,"depth",query)as cursor: for row in cursor: row[0]=0 cursor.updateRow(row)
View ArticleLooping through AGOL services with arcrest
Using this example I am trying to loop through my Arcgis Online account using ArcREST in order to download feature layers locally. However I have not been able to drill down into each folder to acquire...
View ArticleTrace Geometric Network won't execute in custom script tool
I’m trying to make a Python script tool which uses the Trace Geometric Network tool (10.3). My script works in the Python window, but as a script-tool, it runs and NOTHING HAPPENS. Messages state:...
View ArticleSelect point(s) from given coordinate and move to new coordinate using arcpy
Goal: Move address points to their correct location. Plan: I have a layer of AddressPoints of which some need moved to a new location. I want to take a line layer (called AddressPoints_AdjustLocation,...
View ArticleConverting mxd to earlier version using ArcPy?
I am running arcmap 10.2.2 but need to open an mxd saved using 10.3. I do not have access to 10.3. I have an arcpy tool which will do the conversion but it is not working from within 10.2.2. Does...
View ArticleArcpy 10.0 using update cursor completes but ArcGIS crashes
I’m using an update cursor to iterate through my feature class, create a selection and then delete the row if it meets the condition. It partially works – I get no error messages and the script...
View ArticleShapeFile To GeoDatabase Conversion error
I wrote this python code and when i run it nothing happened and it’s success import arcpy # Set environment settings arcpy.env.workspace = 'C:/ShapeFile' # Set local variables inFeatures =...
View ArticleAutomatic update of ArcGIS Runtime Content
My company has developed an app for IOS that can show geographic information mostly directed towards utility companies. In one of the applications I have made an offline search-function that searches...
View ArticleArcPy to Enable Database for use with Data Reviewer
Has anyone ever used ArcPy to Enable Data Reviewer? By this I mean add the necessary feature dataset and tables to an existing geodatabase in order for it to be considered a Reviewer workspace and...
View ArticleTrying to increment a field value for only the repeated records in a feature...
NOTE: If you look at the excel tables just above the comment section it will give a clearer picture of what I want to achieve in my code. So the code below works in doing what I want it to do thus far,...
View ArticleHow to check if a feature class is being used in MXD?
Trying to remove any unused feature classes contained throughout multiple geodatabases. Want to check and see if each feature class is being used in an MXD. Is there any tool/script/methodology to do...
View Article