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:
Categories
- 13K All Categories
- 5.8K Features Discussion
- 350 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 652 GM Script Language
- 56 User Scripts
- 115 GPS Features
- 421 Projection Questions
- 835 Raster Data
- 1.4K Vector Data
- 6.7K Support
- 181 Announcement and News
- 939 Bug Report
- 562 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 579 Other Discussion
- 132 GIS Data Sources
- 27 Global Mapper Showcase
- 244 How I use Global Mapper
- 110 Global Mapper Forum Website
