0 Replies Latest reply on Jun 10, 2016 3:01 PM by Ed Blair

    AutoUpdater to Assign CU Code to Feature Attribute

    Ed Blair

      Wondering if anyone out there has written an AU that would fire OnCreate, capture the compatible unit associated with the feature and write it to a field on the associated feature class?  I know that a (possibly) simpler way to do this would be to make the target field “CU Defining” and assign the code as part of the CU library.  Two reasons why it seems this approach won’t work in our case:


      1. We discovered a Designer bug a while investigating this approach a while ago with a business requirement in mind.  While use of “CU Defining” works fine when the target field has a coded value domain,  it’s not so when the field is a simple text field with no domain.
      2. Other internal aspects of the project may it impossible to change configurations such as a “CU Defining” field.


      So, I’m thinking we can capture the CU from a newly created feature and stuff it into a target field. The other part of this would be that we’d need to handle the case where the CU was changed inside a design.  Which is of course another reason why the “CU Defining” approach would be attractive, but I need to just let that go.)


      Am digging into the object models now and will publish an approach if I find what looks to be a good one.  But if anyone has tackled this task before any information would be much