Automate attribution update?

5296
25
03-09-2016 03:42 AM
RobRees
New Contributor II

Hi guys,

I have a project I am working on which involves me snapping one set of nodes to another set, one by one.

Once this is done I need to update 2 blank fields in one node. One involves copying the item number from one node to the other. And the other update involves inserting a number into a blank field to indicate the node has been paired.

I wondered if there is a way to automate this? i presume this would involve some Python scripting which I am fairly new to, so any simplified advice would be appreciated.

Thanks

Ray

0 Kudos
25 Replies
WesMiller
Regular Contributor III
RichardFairhurst
MVP Honored Contributor

Using Attribute Assistant is the only automation that happens as soon as you edit a feature.  It has an an Intersecting_Feature method (or a few other options) for filling in the first field and an Equation or GenerateID method to fill in the second field.

RobRees
New Contributor II

Thanks for the reply, will this work with data from a personal geodatabase?

0 Kudos
RichardFairhurst
MVP Honored Contributor

It will work.  One of the bug fixes mentions that it was specifically done to make one of the Attribute Assistant dialogs work correctly for a personal geodatabase.

RobRees
New Contributor II

Thanks Richard,

Do you know which download I require? It is not a standalone download, there are several options.. I'm not sure which I should be using.

Thanks,

Ray.

0 Kudos
RichardFairhurst
MVP Honored Contributor

I downloaded the Address Data Management templates for the Local Government Information Model, since my main dataset deals with roads.  However, it doesn't really matter which one you pick as far as the Attribute Assistant toolbar, since that will come with any of the templates and you would be customizing it for your specific needs anyway.  So just download any of the LGIM templates to start.

RobRees
New Contributor II

OK thanks for your help Richard, I'll try and download it tonight. Once I have tried it out I'll let you know how I get on.

Thanks again.

0 Kudos
RobRees
New Contributor II

Hi Richard,

I have added the attribute assistant to my mxd and was about to setup the dynamic table... But Im unsure how to create the Value Method to copy one field from another layer to the field in this layer? This requires knowledge of visual basic syntax?

I cant seem to find much on this when googling so any help would be appreciated.

Thanks,

Ray.

0 Kudos
RichardFairhurst
MVP Honored Contributor

Here is an example of an INTERSECTING_FEATURE record in the DynamicValue table:

OBJECTID *Table NameField NameValue MethodValue InfoOn CreateOn Change (Attribute)On Change (Geometry)Manual OnlyRule WeightComments
193CENTERLINECITY_LEFTINTERSECTING_FEATUREZIP_CODES_WITH_CITIES|CITY|CTrueFalseTrueFalse1<Null>

Table Name is the target layer with the field that needs to be completed by another intersecting layer

Field Name is the field name in the target layer

Value Method is INTERSECTING_FEATURE (any one of the Attribute Assistant methods)

Value Info is made up of 3 components separated by a | character.  The components are:  Intersecting source Feature Class Name|Field Name in the source Feature Class|C(Centroid match) (alternatively I could have used P for Prompt for an option or F for using the first feature intersected)

On Create is set to True so that the moment the feature creation is finished the attribute will be updated.

On Change (Attribute) is set to False, since it doesn't need to refresh due to an attribute change.

On Change (Geometry) is set to True so that any change in geometry refreshes the attribute (the intersecting feature should have been fixed first before the target feature geometry changes).

Manual Only is false, but it could be true if I want to use the Attribute Assistant toolbar to force a refresh

Rule Wieght is optional but I ususally set it to 1

Comments provides any explanation of the purpose or use of the rule.

An Expression update does needs to have its Value Info written the same way you would write a VB Script field calculation.  Use the field calculator to test your expressions and ask for help here if you have problems with a specific equation.

0 Kudos