Hot answers tagged

7

The following should do the job: codedDomains = {domain.name: domain.codedValues.keys() for domain in arcpy.da.ListDomains(gdb) if domain.domainType == 'CodedValue'} Basically, it uses a list comprehension to populate a dictionary, but only if it is a coded value domain. If you wanted to have it populated with the description instead of the coded value, ...


7

You shouldn't need to create a subtype in order to use a coded value domain. It's easy to be fooled by the domain properties dialog as it doesn't have any indicators that the rows in the Domain Properties sections are actually pick lists and it's only the default which is long integer. I just verified domains without subtypes works (in v10) with: Start ...


5

Subtypes and Domains are for Geodatabases only - exporting to shapefiles will not work (they are old tech compared to geodatabases) subtypes categorize your data. domains constrain input information to validate data entry. Apply coded or ranged domains to features, enabling you to constrain input information to a valid set of values. For example, in a ...


4

Use the "Remove Domain from Field" tool (Data Management > Domains) to remove the attribute rule, allowing you to delete the domain. If you want to export a domain to a shapefile, you have to go through a six step process. Export the feature class to shapefile.Add a new field of the appropriate type to the shapefile (e.g. String if the domain ...


3

Zip and upload is not going to work. As it says at the bottom of hypelink you have to share your MAP as feature service.


2

I followed the steps in an ESRI blog which shows how to add a domain through the REST API. Direct link to the document: click me Here's what I put to add a Yes/No domain to a field called Completed: { "name": "Completed", "type": "esriFieldTypeString", "alias": "Completed", "sqlType": "sqlTypeOther", "length": 50, "nullable": true, ...


1

The issue here is that the domains do not prevent you from adding incorrect data into the fields. You need to validate the features first. To do this, you need to be in an edit session. Then, select the features you want to validate. If any of them are invalid, you'll get an error. If you select a single feature and validate it, you'll get a more ...


1

Yes, there is a much easier work-around: enable editor tracking.


1

The following should do it. Create a dictionary that contains your feature class names, and a dictionary of the fields and domain names e.g. fieldDomains = {'Hydrant': {'Make': 'Hyd_MAKE', 'Size': 'Hyd_Size'}} This is then checked against feature classes and fields to assign the correct domain to each field. The script loops through each feature class, ...


1

If you are truly looking to create a relationship between the "Points" feature class and "Lines" feature class, I would go with using a relationship class between the two. To do this, the feature classes need to be in either a File Geodatabase, Personal Geodatabase, or Enterprise Geodatabase and you will need ArcGIS Desktop. See http://desktop.arcgis.com/...



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