Select to view content in your preferred language

Dynamic domain based on a feature class?

03-29-2016 05:10 AM
New Contributor

I am trying to create a dynamic domain based on a feature class..

I have a geodatabase with two feature classes, lets call them "object location" (OL) and "parking areas" (PA). OL is basically a point layer with an attribute "object name" (ON). This table thereby lists all object names.

I want to give the editor of the data the possability (when creating new parking areas) to select from a list, what object this parking area belongs to. Now, it is easy to create a static domain based on all the values in "object name" (ON), and thereafter assign that domain to the correct attribute in PA. The problem however is that i want the list to be dynamic. By this I mean that the editor should be able to create a new OL, thereafther create a new PA and be able to connect it to the OL he just created.

In other words, i want the domain assigned to PA to retrive its values NOT from the list we created out of the values from OL, but directly from the ON attribute it self. Alternatively from a list that somehow gets uppdatet every time we create a new OL. (This should also work in the opposite matter, so that if I delete a OL, then it will no longer appear in the domain list.

Anny takers on how this can be done?

Best Regards

0 Kudos
2 Replies
New Contributor III

If you would be happy with a semi-automatic solution, you could make a custom/python toolbox with a script tool that updated the domain based on the contents of OL. The user could run the tool either after adding an OL point and/or before starting to edit PA.

A more automatic solution would be to make an add-in that monitored the OL feature class and ran a script when the number of records changed. The script being something that updated the domain based on the contents of OL.

I haven't ever thought of doing this, so don't have any examples to give you. I think  this is a great idea though. 

New Contributor

Two greate ideas.. unfortunately, i am no so good with pyton as i wish i was.. hehe..
Now, all i have to do is to find some smart person to wright this for me.. preferably the second solution.. hehe..
Thx for the reply though..
Others are more than welcome to add alternate solutions..

0 Kudos