Sample - Rotate Command

Version 4

    Versions: 10.0.1 - current

    Product Availability: ArcFM Engine


    This command may be used in ArcFM Engine applications, including ArcFM Viewer for ArcGIS Engine and Designer Staker. The Rotate command may be used to rotate point features.

    This tool enables only when the user has editing capabilities. In ArcFM Viewer for ArcGIS Engine, this means you must have an Inspector extension or an inspection job started. In Designer Staker, you must have a stake job opened to enable this tool.


    How to Implement:

    1. You may modify the code sample. This step is not required.
    2. Build the solution.
    3. Copy the DLL to the ArcFM Solution\bin directory.
    4. Next, you'll add the command to the user interface. Open the ArcFM Engine Administrator.
    5. Select the Layout and Licenses tab.
    6. Above the Loaded Components window, select ArcFM Viewer or Designer Staker (available in versions prior to 10.1.1) from the pull down menu, depending on the application to which you want to add the command.
    7. Click the Add button.
    8. Select the DLL you added to the ArcFM Solution\bin directory and click Open.
    9. You will be prompted to choose an option from the Commands list. Select StakerRotateTool and click Add.



    The Rotate Features tool is added to the Loaded Components window. Click OK to close the ArcFM Engine Administrator.


    How to Use:

    1. First you'll add the command to a toolbar. In Designer Staker (available in versions prior to 10.1.1) or ArcFM Viewer, select Tools > Customize.
    2. Select the Commands tab and choose the Developer Samples category.
    3. Drag the Rotate Features tool and drop it onto a toolbar. Click Close on the Customize window.
    4. Start an edit session. If you're using Designer Staker you will likely already have a stake job started. If you're using Inspector, you'll need to open an edit session.
    5. Select a single feature. You cannot rotate multiple features using this tool.
    6. Click the Rotate tool.
    7. Click and drag the feature on the map to rotate it.



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


    Rotate.slnC# solution containing the Rotate command code sample
    Rotate.csprojC# project containing the code to generate a custom Rotate command object
    AssemblyInfo.csClass module to support the command
    StakerEditContextMenu.csClass module that adds the Rotate command to the context menu
    StakerRotateTool.csClass module that contains the Rotate command