Exit a loop
veddycent
Global Mapper User
Hi all,
I'm looping through a large directory of about 10,000 files. I need a way to exit out of a directory loop based on a counter or total number of layers in scene.
Here is a snippet from my script. Text in bold is pseudo code of what I was thinking.
DEFINE_VAR NAME="AERIAL_IMAGE_FILES" PROMPT=DIR ABORT_ON_CANCEL=YES PROMPT_TEXT="Location of Aerial Image Files"
I'm looping through a large directory of about 10,000 files. I need a way to exit out of a directory loop based on a counter or total number of layers in scene.
Here is a snippet from my script. Text in bold is pseudo code of what I was thinking.
DEFINE_VAR NAME="AERIAL_IMAGE_FILES" PROMPT=DIR ABORT_ON_CANCEL=YES PROMPT_TEXT="Location of Aerial Image Files"
DIR_LOOP_START DIRECTORY="%AERIAL_IMAGE_FILES%" FILENAME_MASKS="*.%AERIAL_FILE_FORMAT%" RECURSE_DIR=YES
IMPORT FILENAME="%FNAME_W_DIR%"
LOG_MESSAGE %FNAME_W_DIR%
IF(TOTAL LAYERS > 25)
EXIT LOOP
IF(TOTAL LAYERS > 25)
EXIT LOOP
DIR_LOOP_END
Is this currently possible?
Regards
V
Is this currently possible?
Regards
V
Tagged:
Howdy, Stranger!
Categories
- 12.2K All Categories
- 5.3K Features Discussion
- 312 Downloading Imagery
- 1.2K Elevation Data
- 371 Georeferencing Imagery Discussion
- 580 GM Script Language
- 42 User Scripts
- 111 GPS Features
- 388 Projection Questions
- 788 Raster Data
- 1.3K Vector Data
- 6.4K Support
- 159 Announcement and News
- 881 Bug Report
- 554 SDK
- 1.1K Suggestion Box
- 3.6K Technical Support
- 520 Other Discussion
- 125 GIS Data Sources
- 26 Global Mapper Showcase
- 217 How I use Global Mapper
- 99 Global Mapper Forum Website