VBA/Autocad Printing Question

Discussion in 'AutoCAD' started by FireProtection76, Aug 30, 2004.

  1. Hello everyone,

    I wrote a vba app to iterate through the drawing layouts and print them into sets. The number of sets the user enters into a text box. The problem is that the drawings are not coming our in the order I sent them (ie, the smaller files that transfer the quickest are the first ones to print). I am using the following dos shell command:
    For y = 1 To copysets
    For x = 0 To UBound(arrFinal)
    Shell "c:\kipBatch.bat " & """" & arrFinal(x) & """"
    Next x
    Next y

    Is there any way to prevent the out-of-order printing? Perhaps a queue to I can make in vba??
     
    FireProtection76, Aug 30, 2004
    #1
  2. FireProtection76

    TomD Guest

    into sets. The number of sets the user enters into a text box. The problem
    is that the drawings are not coming our in the order I sent them (ie, the
    smaller files that transfer the quickest are the first ones to print). I am
    using the following dos shell command:
    I can make in vba??

    Could it be a print server issue?

    I've never had such a thing happen here, sending PLT files from a web server
    shell.
     
    TomD, Aug 31, 2004
    #2
  3. It's a kludge, and you'll have to try it to even see if it would solve your
    problem, but you could put a few seconds' pause after each shell command
    time to give it time to get in the queue ....

    Code:
    [QUOTE]
    Shell "c:\kipBatch.bat " & """" & arrFinal(x) & """"[/QUOTE]
    Call PauseProg(5)
    
    Public Sub PauseProg(pauseTime As Double)
    'pauseTime is in seconds
    Dim i As Long, start As Double
    
    If Timer + pauseTime < (24 * 60 * 60) Then
    start = Timer
    Do
    Loop Until Timer > start + pauseTime
    Else
    'loop would have run for 24 hours before exiting...
    'could enhance to loop until either:
    '   A) (time > endTime), or
    '   B) (date >= endDate) and (time > endTime)
    End If
    
    End Sub
    

    into sets. The number of sets the user enters into a text box. The problem
    is that the drawings are not coming our in the order I sent them (ie, the
    smaller files that transfer the quickest are the first ones to print). I am
    using the following dos shell command:
    I can make in vba??
     
    James Belshan, Aug 31, 2004
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.