1

I've got two feature classes, "Points" and "Lines", the first is a feature point class, the other is a line class. I've got a coded value domain field for the "Points" class, that I'd like to add the names of the "Lines" features to as I add more "Lines" features.

Ex. If there were two line features on the "Lines" layer named "Line1" and "Line2", and a point feature on the "Points" layer named "Point1", I'd like the "Pick a Line" domain field for "Point1" to contain "Line1" and "Line2". If I were to add a "Line3" to the "Lines" layer, I'd like "Pick a Line" to now contain "Line3".

Would I need ArcPy to accomplish this, or is this already doable?

Would it be easier to set up a "relationship" between the two layers?

  • I don't believe what you're asking for is doable in ArcMap without a custom tool. If you have a coded value domain set for a field, it will only allow you to select one of those values for that field for a given record (that is, if you're using the Attribute Table or the Attribute Window). – Zachary Ordo - GISP Jun 1 '16 at 18:02
  • You could probably do it with arcpy, however it wouldn't be automatic (you'd have to run it to update your list). – Midavalo Jun 1 '16 at 21:01
2

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/en/arcmap/latest/manage-data/relationships/benefits-of-relationship-classes.htm for the benefits and http://desktop.arcgis.com/en/arcmap/latest/manage-data/relationships/creating-a-simple-relationship-class.htm for creating a simple relationship class.

Based on your question, the relationship should be created as a one-to-many relationship between the "Lines" feature class and the "Points" feature class. A field in the "Points" feature class (such as the coded value domain field in your question without the coded value domain) will be used as the relationship foreign key. It has to be the same type as the primary key (or identifier, the field containing "Line1" and "Line2" in your question) in the "Lines" feature class. Typically a Long Integer type is used for best performance, but Text will work as well.

By creating the relationship class, you will be able to use all of the ArcGIS tools and SDKs to perform edit and query operations on the relationships (e.g. create the relationship, drill down into the relationships, etc.). Furthermore, if you plan to use tools outside of the ArcGIS stack, you can still access the relationship information using standard SQL to join the underlying tables.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.