How do I use the ERA command in a script, macro or hotspot?

DaltonSpenceDaltonSpence Mapmaker
edited September 2020 in Macros and XPs

I tried to create a self erasing hotspot with the command ERA pt; with pt being the corner of the hotspot but it still wants to select more entities to erase. How do I end the command and just do it?

Hotspots that Self Destruct
  1. Am I crazy trying to create a "use once" hotspot?3 votes
    1. Yes
        0.00%
    2. No
      100.00%

Best Answers

  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    Accepted Answer

    You need to change to a more macro-friendly selection method.

    Personally, I love to use selection by layer (SELBYL) since that means you don't have to go for specific coordinates in the macro. Just make sure the hotspot is on the appropriate layer, and don't put anything else there.

    Remember to reset the selection method when done. Usually best to save it with SELSAVE, and restore it a the end of the macro with SELREST

    DaltonSpence
  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    Accepted Answer

    Yes, it will work fine with SELBY1 too.

    I prefer not selecting by coordinates in macros though, because it is more vulnerable to changes in the map, say you wanted to move things over a bit, but from a pure technical standpoint, that is just fine.

Answers

  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    Accepted Answer

    You need to change to a more macro-friendly selection method.

    Personally, I love to use selection by layer (SELBYL) since that means you don't have to go for specific coordinates in the macro. Just make sure the hotspot is on the appropriate layer, and don't put anything else there.

    Remember to reset the selection method when done. Usually best to save it with SELSAVE, and restore it a the end of the macro with SELREST

    DaltonSpence
  • Wouldn't SELBY1 work just as well since I know the exact corner point of the hotspot?

    SELSAVE;SELBY1;ERA 135,200;SELREST;

    Or do have to put the hotspot on a temporary layer?

  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    Accepted Answer

    Yes, it will work fine with SELBY1 too.

    I prefer not selecting by coordinates in macros though, because it is more vulnerable to changes in the map, say you wanted to move things over a bit, but from a pure technical standpoint, that is just fine.

Sign In or Register to comment.