Skip to main content

Enhancement Request for Undo Drawing in VertiGIS Studio Web (ArcFM Web XI)

Comments

6 comments

  • Alisa Lindley

    Hi Emily,

    Thank you for the suggestion!

    Removing just one drawing is currently possible in VertiGIS Studio Web using the out-of-the-box Edit Markup command. The perk of this tool is that it also allows the user to modify the geometry if they didn't draw it quite right the first time.

    If you would like something that specifically deletes drawings instead of opening up a whole editing toolbar, you could use the map.get-markup operation and the map.clear-markup command. If specific graphics are fed to the map.clear-markup command, only those graphics will be removed. Starting the command chain with something like sketching.capture-geometry would allow the user to pick the drawing that they would like to delete. The command chain might look something like this:

    [
        {
            "name": "sketching.capture-geometry",
            "arguments": {
                "geometryType": "extent"
            }
        },
        "map.get-markup",
        "map.clear-markup"
    ]

    Alternatively, you could use VertiGIS Studio Workflow to create a more complex solution. For example, you might be able to remove the last item in the graphics collection to simulate an undo drawing operation. If you would like help building a tool like this, our Professional Services team may be able to lend a hand.

    I hope that helps!

    1
  • Matthew Wartman

    Thanks Alisa Lindley . The command chain you provided works well for most graphics, but it does not remove all graphics such as Notes. I would expected that "vgs-map-notes" should have been returned from the "map.get-markup" command - could this be a bug?

    0
  • Alisa Lindley

    Hi Matthew,

    As far as I know, map notes would not be considered markup. Markup includes drawings, measurements, and graphics added using the Add Graphics workflow activity (NOTE: Older versions of Workflow/Web did not put markup and graphics in the same category). Furthermore, if the markup is placed in a non-default collection, it will not be cleared using map.clear-markup unless the collection is specified in the command's arguments.

    If you would like to add text to the map as markup, you could use a workflow to create a point feature, generate a text symbol from JSON, and add it to the map using the Create Graphics activity. Esri's Symbol Builder is a useful tool for generating symbol JSON. If you use it, you'll want to copy everything inside the .fromJSON function and paste it into the Get Symbol From JSON workflow activity. Since the JSON is where the display text is defined, you would likely need to use a Replace activity to set it dynamically.

    I hope that helps! If you need further help, please feel free to open a support ticket.

    0
  • Matthew Wartman

    Thanks Alisa Lindley.

    According to the documentation, arguments for the "map.get-markup" operation include a "vgs-map-notes" collection so I assumed map notes would be included. Maybe the documentation is incorrect here?

    Appreciate your workaround suggestion on how to add text as a markup. 

    0
  • Alisa Lindley

    Hi Matthew,

    If they're listed as their own collection, you should be able to access them by specifying the collection name as an argument in the map.get-markup and map.clear-markup commands. If no collection is specified, the default is used, which includes the items I listed above. The following command, for example, should go through successfully:

    [
        {
            "name": "map.clear-markup",
            "arguments": {
                "collection": "vgs-map-notes"
            }
        }
    ]

    For any further assistance, please open a support ticket with us.

    0
  • Matthew Wartman

    I was able to remove map notes with the following command chain, but cannot separate this out from other graphics/measurements. In other words, when I add additional collections such as “default”, the input sketching geometry is ignored and either all the map notes are removed, or all the graphics. 

    I'm looking for a command chain that will remove all graphics (including map notes) that the user clicks on the map.  I will open a support ticket. Thanks!

    [
        {
            "name": "sketching.capture-geometry",
            "arguments": {
                "geometryType": [
                    "point",
                    "extent"
                ]
            }
        },
        {
                        "name": "map.get-markup",
                        "arguments": {
                            "collection": "vgs-map-notes"
                        }
                    },
    {
                        "name": "map.clear-markup",
                        "arguments": {
                            "collection": "vgs-map-notes"
                        }
                    }
        
    ]
    0

Please sign in to leave a comment.