Tag Info

Hot answers tagged

6

The simplest way is to create a full list and then remove the ones you don't want: AllFields = [f.name for f in arcpy.ListFields(featureclass)] StringFields = [f.name for f in arcpy.ListFields(featureclass,field_type='String')] NoStringFields = [x for x in AllFields if x not in StringFields ] Which could be compressed onto a single line: ...


6

My method for this was to use the Field Mappings and Table to Table conversion functions. Using field mappings you can set new fields based on the names of fields in your input table. The following link has examples for feature classes: http://resources.arcgis.com/en/help/main/10.1/index.html#//018z0000007p000000 My code below will change all fields in an ...


2

Here's one approach to designing your database tables: Wherever you have shapes that have exactly the same combination of geometry type and set of attributes, put them in one single table. Probably, this will be based on those themes you mention. If that still appears to be too many tables, maybe think about combining those themes that are very similar (re. ...


2

If your organization uses AutoCAD, I would suggest to have a look at ESRI's "ArcGIS for AutoCAD" product. It should theoretically allow a much more streamlined working process between AutoCAD and ArcGIS, where both your ArcGIS and AutoCAD users, can use and edit the same datasets stored in an ESRI Geodatabase via editable webservices. See here for the ...


2

There is only one way to efficiently do this that I know of. Load the replica database fields into a dictionary using a searchcursor with the GlobalID as the dictionary key, then loop through a searchcursor on the origin database and attempt to retrieve the GlobalID dictionary key that matches each record. Set up four counters: count, added, deleted, and ...


1

A complete one-liner would be [f.name for f in arcpy.ListFields(featureclass) if f.type not in ["String"]] You can add more entries to the latter list that you do not want to include, or the ones that you want to include by removing not operator.


1

Create a field with the order they are supposed to be in, then input that field into the "sort field" option.


1

From a sample size of 1, my answer is DON'T. With offline files enabled, and the relevant folder in "Work Offline" mode, a simple arcpy.ListFeatureClasses() balloons from the already-far-too-long 2min25s to 35min(!) For reference, same call to gdb on local SSD volume is 27.5s. I haven't ruled out other problems, the two tests were conducted a week apart ...


1

Export Data Change Message GP tool could be used which creates a delta file with changes to synchronize (number of records could be obtained from the result).



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