|
Ned, Try this out in the DK immediate
execution box. I recommend trying it
with a small selection set first, to test it out. It requires that you have a folder called “Map
Images” in the root of your C: drive, or you can
modify the code to change the path for the saved images. FYI, this will work with any layer, so
long as there is a “Name” field in the layer’s data. //store
original settings workingselection=getlayer()+"|Selection" workinglayer=getlayer()+"|" oldscope=getmapscope(getmap()) //count
areas and get started numareas=getsetcount("Selection") dim arealist[numareas] dim sz[2] arealist=getsetids(workingselection) //Create
Progress Bar EnableProgressBar("Batch Maps - " + string(numareas), 1) CreateProgressBar("Creating Map...",
"True") for areanum=1 to
numareas do currentarea=arealist[areanum] selectbyids("Selection","Several",{currentarea}) rh=id2rh(currentarea) myscope=getrecordscope(rh) setmapscope(getmap(),myscope) sz=getscoperect(getrecordscope(rh)) activelayer=getlayer() setrecord(activelayer,rh) jpegname="c:\\Map Images\\" + activelayer.("Name")+ ".jpg" SaveMapToImage(, jpegname, "JPEG",
{{"Quality", -300}}) stat = UpdateProgressBar("Map
Number " + String(areanum), r2i((areanum/numareas)*100)) if stat =
"True" then do ShowMessage("Oops! Try again.") goto quit_loop end End quit_loop: DestroyProgressBar() //restore
original settings setmapscope(getmap(),oldscope) selectbyids("Selection",
"Several", arealist) Redrawmap() ________________________ From: Armando: On 5/23/06, [EMAIL PROTECTED]
<[EMAIL PROTECTED]>
wrote: Ned, SPONSORED
LINKS YAHOO!
GROUPS LINKS
SPONSORED LINKS
YAHOO! GROUPS LINKS
|
- [Maptitude] Batch file creation Ned Hawley
- Re: [Maptitude] Batch file creation Stewart Berry
- [Maptitude] Batch File Creation armando
- Re: [Maptitude] Batch File Creation Ned Hawley
- RE: [Maptitude] Batch File Creation Jason Black
