Sample - Attribute Autoupdater: Simple Auto Angle Setter

Version 2

    Versions: 9.3.1 - current

    Product Availability: ArcFM Desktop

     

    This attribute autoupdater automatically rotates a point feature by the same angle of the linear feature to which it is snapped. This autoupdater works only with simple (or non-network) point features.


    How to Implement:

    1. You may modify the code sample. This step is not required.
    2. Build the solution and copy the DLL into ArcFM Solution\bin.
    3. In the ArcFM Solution\bin directory, drag the dll and drop it onto RegX.exe to register it.


    How to Use:

    1. In ArcCatalog, select a point feature and assign the Simple Auto Angle Setter autoupdater to the On Feature Create and On Feature Update properties on a field with a data type of Double (e.g., SymbolRotation field). This field must have a data type of Double. If the data type is not Double, the autoupdater will not appear in the dropdown list.
    2. Open ArcMap.
    3. Before placing the feature, you must enable Symbol Rotation on the layer to which you assigned the autoupdater. Select the Display tab in the Table of Contents.
    4. Right-click the feature layer and select Properties.
    5. Select the Symbology tab.
    6. Click the Advanced button and select Rotation.
    7. In the "Rotate Points by Angle in this field" pulldown menu, select the field to which you assigned the Simple Auto Angle Setter autoupdater.
    8. Click OK on all dialog boxes.
    9. Select the feature layer and set its snapping properties (Editor > Snapping...). You may need to start an editing session to enable the Snapping tool.
    10. Now you may place the feature. It will rotate to the same angle as the feature to which it is snapped.


    Requires:

    All of the files shown below are required for the project to compile successfully.

     

    FileDescription
    Miner.Samples.AttrAU.csprojC# project containing the code to generate a custom attribute autoupdater
    SimpleAutoAngleSetter.csThis class module provides a simple algorithm to automatically set the angle field and rotate the symbol based on the angle while the simple point feature is placed on the map. This AU works only on non-network features.
    AssemblyInfo.csSupporting class module.