Tag Info

Hot answers tagged

3

As a test I suggest trying to change: outname = str(fc) + parish + ".xls" to outname = 'C:\\Parishes\\' + str(fc) + parish + ".xls" I suspect that trying to write a *.xls to a *.gdb (even though that is a folder) is what may be upsetting the tool.


3

You do not need the [0] brackets here on this statement: if photolink[0][:4] == "http": That would return "h" only and not "http" TRY if photolink[:4] == "http": The new arcpy.da.UpdateCursor in v10.1 and greater uses bracket indexes to relate to defined field(s) and also is faster since it does not iterate over each fc field. with ...


2

The Correct form of your code is : def FindLabel ( [amenity], [osm_english_32_name], [osm_name_58_en] ): if not ([osm_name_58_en] is None): return [osm_name_58_en] elif not([osm_english_32_name] is None): return [osm_english_32_name] + '\n' + [amenity] else: return [amenity] The semicolon in the last line is removed. ...


2

If you want code in an add-in like a button to be available when it is loaded rather than when it is clicked, in the Config.esriaddinx file add onDemand="false" to that button's xml. You can also use an Extension class to execute code during its OnStartup(). Create the extension, and in the Config.esriaddinx file, add autoLoad="true" to its xml.


2

using Arcmap 10.1 you can use an alternative option: add your all geo-refed raster in a new arcmap define the projection properly in the data frame properties Go to windows menu and click on image analysis. In image analysis tool select all your rasters and click on mosaic button present in a window below named "processing". A temporary raster add in table ...


2

@PolyGeo's answer is accurate. But I just want to draw attention to the use of table views in the original case; they shouldn't be necessary. Code could be simplified down to something like this: import arcpy import os arcpy.env.workspace = r'C:\Parishes\Cameron.gdb' parish = "Cameron" # use other folder as needed out_folder = arcpy.env.scratchFolder ...


1

Here is my solution... open in arcmap the suspect layer. zoom to the entire dataset. make it the only selectable layer (if there is more than one) start editing make a selection box around all of the features switch the selection you now have all the <NULL> geometry rows in the sde table. delete


1

You could have the add-in enable or disable depending on the name of the mxd by putting a boolean test in the OnUpdate() sub. If My.ArcMap.Application.Document.Title = Authorized.mxd Then Enabled = True, or something like that. You could also require a user to enter a password and have each add-in on your toolbar query the result in its OnUpdate() and then ...


1

The suggestion by @MichaelMiles-Stimson is a good one. Alternatively, you could type some code into the Python window of ArcMap: mapDoc = arcpy.mapping.MapDocument("CURRENT") scaleBar = arcpy.mapping.ListLayoutElements(mapDoc,"MAPSURROUND_ELEMENT")[0] print scaleBar.parentDataFrameName If your scale bar is the only Map Surround Element in your map then ...


1

Mosaicking non georeferenced images using ArcMap may not be possible at all. I Suggest you use online base-maps if you know the locality of the images, look for duplicate points from the image and an online base-map then use those values to first georeference so that you can Moiasack


1

The caching tools that exist in the ArcToolbox on Desktop simply make calls to the Caching tools that have been already published on the Server. If your workflow involves updating a cache through these tools, simply call the tools on Desktop, or call the already published tools on the Server. Publishing these tools as their own GP Service introduces an ...


1

The code presented in your question doesn't match what is asked for in the question. "I'm trying to label certain features using a specific field (osm_name_58_en). However, when this field is null, I want to label the feature with (som_english_32_name). If both are null then I want to label with the (amenity) field." This sentence implies that you only ...


1

The most reliable way to do this in ArcMap is to use the Table to Excel (Conversion) tool, making sure the Use field alias as column header checkbox is checked: How column names in the output are determined. NAME —Column headers will be set using the input's field names. This is the default. ALIAS —Column headers will be set using the input's ...



Only top voted, non community-wiki answers of a minimum length are eligible