View Single Post
Old 15-05-2003, 11:57
Posts: n/a
Default Sorry I havent Got back to this.. Here's what I've found out

I went throught and tried different loops; ones with only open file calls, Open and Save, DB no DB etc.

The script in its most stripped down state:

Option Explicit

Sub MCP()

Application.Optimization = True

Dim i As Integer
Dim Doc As Document
Dim Spacer As String

Spacer = "[=-----------------------------------------------------=]"

'this is log entry setup
Open "C:\!MCP\!!TESTING.txt" For Output As #1
LogEntry ("-=-=-=TESTS Started: " & Date)
LogEntry (Spacer)

i = 0

Do While i <> 1000

i = i + 1

LogEntry (i & ". Opening Template...")

Set Doc = OpenDocument("c:\!MCP\Template5.cdr")


Doc.Dirty = False


LogEntry ("File Closed")
LogEntry (Spacer)


Close #1
Application.Optimization = False
LogEntry ("-=-=-=TESTS ENDED: " & Date)
LogEntry (Spacer)

End Sub

Private Function LogEntry(LogText As String)

   Print #1, (LogText)

End Function

Now, when I run this segment of Code many things happen:

1. Memory Starts at 34 MB for CORELDRW.EXE
2. START: Then memory spikes to 89, down to 50, up to 90, 48, 90, 50,89
3. After the 1 Minute mark the program rests at 48 MB
4. After about 123 itereations of the loop we get memory usuage at 50 MB
5. Program crashes with #1002-LISTMAN 0737 at 282 iterations and 53 MB
6. The file being loaded and closed is about 99 KB

Any thoughts or input would be greatly appreciated..

--Wolfgang :twisted:
Reply With Quote