How to add a Create Point Feature function

FacilitiesMap allows the editing and creation of point feature geometry. In order for a user to create a point feature for a particular layer, that layer must first be enabled for geometry editing and also must be a point layer. This is enabled under the FacilitiesMap Administrator by editing the data definition:



Once the data definition has been configured, you can add a button on the toolbar which allows users to create a new point feature for that layer. To do this, a custom command must be added to the toolbar on a per-Web Layout basis via Autodesk Infrastructure Studio.
 
IMPORTANT NOTE: the function on this page is added as a custom command button to the map toolbar. See that article for how to add such a button.
 
Under the Settings tab, enter the following (you can change these values if you wish):

 
    Command name: Create Point Feature
    Name to display in the interface: Create Point Feature
    Tool tip to appear on the hover: Create Point Feature
    Description to appear on the status barCreate Point Feature
    URL to an image for enabled state: ../stdicons/icon_invokescript.gif
    URL to an image for disabled state: ../stdicons/icon_invokescript_disabled.gif

Note that if you want to have multiple "Create Point Feature" buttons on the toolbar, you may want to differentiate the names of the buttons by adding the layer name and/or choosing a different icon.
 
Under the Additional Parameters tab, enter the following under Script to invoke:

 
    WSD.DigitizePointForDataId(123);
 

You'll need to replace "123" with the Data Definition ID of the related data definition that has geometry point editing enabled. 

The Data Definition ID is shown in the listing of data definitions under the "Data ID" column or by hovering over the data definition:


For builds 1608 and before, use parent.DigitizePointForDataID(123); instead.
 
Once the button is enabled on the toolbar, it's important to remember that *ALL* users can see this button, regardless of whether or not they have the correct editing permissions to actually use it. As a result, we recommend that this button is only created on an appropriate map that is restricted to users who can edit the layer.


[Last updated for version 2306 (12/2012)]
Comments