How do I use the ERA command in a script, macro or hotspot?
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?
- Am I crazy trying to create a "use once" hotspot?3 votes
- Yes  0.00%
- No100.00%
Best Answers
-
Monsen Administrator 🖼️ 81 images Cartographer
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
-
Monsen Administrator 🖼️ 81 images Cartographer
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
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
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?
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.