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 ...


3

According to the List of Tools not available in ArcGIS Pro "collapse dual lines to center line" was not brought over to ArcGIS Pro. I am not sure how to combine the lines. You could try to merge and dissolve the lines with a common field. Or you could delete one of the lines and take an off-center line as the represented line. ArcGIS Pro is a step forward in ...


3

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 ...


2

Correct. That functionality is not part of ArcGIS Pro. Among others. Link to tools that are not available in Pro.


2

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.


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

I would suggest you create a series of models using iterators. You can create a model for each type and nest the models as sub models in order to include all of them into a single model. You would have to do this because a model can have only one iterator. So each model will iterate through the data object then deltete. Use preconditions to control the flow. ...


2

Copy Features handles the conversion of file formats (shp into sde-fc like in your example) simply by what workspace has been defined in the output path.


1

You are calling your function with text values " " instead of field names ! !, therefore it returns true to the first condition. just try this : codeblock = """def mthree(mthre, mtwo): if mthre >= 1: return -3 if mtwo >= 2: return -5 else: return None """ ...


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