Justin:

My solution was fine except for the wrong second argument to the
ProgName_SYS function, the code should be:

real rWait, rT, rT0, rT1, rMinutes;
int iPercent;

......

rMinutes = 0.2;         // insert your value here...
rWait = rMinutes/60.0;  // convert to hours
rT0 = rTime_SYS();
rT1 =  rT0 + rWait;
Progress_SYS(1);
ProgName_SYS("Pausing - Hit cancel to finish", 1);
do {

   rT = rTime_SYS();
   iPercent = (int)(100.0*(rT-rT0)/(rT1-rT0));
   
   ProgUpdate_SYS(iPercent);   
   if(iCheckStop_SYS())         // Let user break out
      break;

} while(rT1 > rT);

Progress_SYS(0);


Stephen Cheesman


-----Original Message-----
From: Ward, Justin [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 13, 2000 3:00 AM
To: [EMAIL PROTECTED]
Subject: [gxnet]: Pause GX


                Dear list,

                Our HP 2000CP plotter runs out of memory when I attempt to
print 100+ 10MB A4 plots to it. We are at the upper limit of the physical
memory & checking "process in computer" does not help. HP support have no
solutions, bar suggesting we buy a new plotter with a built in hard drive.
Not an option.
                The solution is to modify the Mapprint gx to pause for a
user definable period of time, after processing a user definable number of
maps. In practise I have used the iFileSize_SYS(sMap) function to work out
how many maps can be printed at a time given the amount of plotter memory.
So I've completed the GX, but what I need is a pause function. I dare say
someone would have already created such a GX that when called pauses the
current GX for GetInt_SYS("GXPAUSE","MINUTES") period of time. So in the
spirit of collaboration, if someone sends me such a function I will send
through the completed _MAPPRINT2 GX. Otherwise if I don't get any reply in a
few days I'll have to do it myself. This will be difficult however since for
complex reasons I don't have a VB or VC compiler on my current machine!
Maybe a newbie could practise with this task (use a timer control), or an
experienced GX developer could whip it up in under an hour.  

                Justin Ward
                Senior Geophysicist
                De Beers Geology Division
                Africa Exploration - Geophysics Section


****************************************************************************
*
The information contained in this e-mail is confidential and may 
be subject to legal privilege. If you are not the intended recipient, 
you must not use, copy, distribute or disclose the e-mail or any 
part of its contents or take any action in reliance on it. If you have 
received this e-mail in error, please e-mail the sender by replying 
to this message. All reasonable precautions have been taken to 
ensure no viruses are present in this e-mail and the sender cannot 
accept responsibility for loss or damage arising from the use of this 
e-mail or attachments.
****************************************************************************
*
_______________________________________________________
More mailing list info http://www.geosoft.com/support/listserv/index.html
List Archive http://www.mail-archive.com/[email protected]
_______________________________________________________
More mailing list info http://www.geosoft.com/support/listserv/index.html
List Archive http://www.mail-archive.com/[email protected]

Reply via email to