End of Publish Event - 2005

Discussion in 'AutoCAD' started by xxxTed Schaefer, Sep 27, 2004.

  1. How do you capture the end of Publish event, not when

    the command disappears, but when all of the background

    plotting is done.



    - Ted

    WD Partners
     
    xxxTed Schaefer, Sep 27, 2004
    #1
  2. xxxTed Schaefer

    VBA Guest

    EndPlot perhaps?
     
    VBA, Sep 27, 2004
    #2
  3. I believe, publish will go into background plotting and fire multiple begin
    and endplot events.

    - Ted
     
    xxxTed Schaefer, Sep 27, 2004
    #3
  4. You're correct, for each layout published a endplot event will fire. If you
    are doing a multi-page, publish will generate the individual DWFs in the
    temp folder, compile them into the single DWF file and place it in the
    output location.

    Best thing to do is count the endplots to see when they equal the number of
    sheets sent, then turn on a folder watcher to locate the new file. Trying
    to use a straight folder watcher gets tricky because the final DWF can
    appear before AutoCAD is finished compiling it depending upon the number of
    layouts, their complexity and the processing time.

    -- Mike
    ___________________________
    Mike Tuersley
    CADalyst's CAD Clinic
    Rand IMAGINiT Technologies
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Sep 28, 2004
    #4
  5. Mike,

    Counting the number of endplots seems like a good idea. Where is the number
    stored?

    I am not just doing DWF or printing to a file, but also printing to
    accounting for plots
    directly to a device. I guess that I could undefine the pesky Publish
    command until
    Autodesk gives us some proper events to monitor.

    - Ted Schaefer
    WD Partners
     
    xxxTed Schaefer, Sep 28, 2004
    #5
  6. Counting the number of endplots seems like a good idea. Where is the number
    Its not. Use two counters. When you issue the plot command, set counter1 to
    zero and counter2 to the number of layouts. Then setup a loop that compares
    counter1 to counter2 and doesn't exit until they are equal.

    To increment counter1, add code to the EndPlot event so it updates it ---->
    counter1 = counter1 + 1

    cheesy but it works.

    -- Mike
    ___________________________
    Mike Tuersley
    CADalyst's CAD Clinic
    Rand IMAGINiT Technologies
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Sep 28, 2004
    #6
  7. Mike,

    "Cheesy but it works" > This kind of thing seems to be S.O.P. when you try
    to track plotting in AutoCAD with VBA.
    Hey, but I love cheese.

    In 2005, what if you want to Publish drawings that aren't open in the
    editor. Can you count the layouts?

    Here's another way that I just got to work.

    When you start plotting, startup a timer and watch for the creation of
    PlotandPublishLog.CSV.
    I have been focusing on this file anyway because it provides the most
    reliable plot information so
    far, except it still doesn't track the number of plot.

    The implentation is a little tricky because you have to trap for plotting
    from the preview command
    and when a user cancels. Then you have to decipher, paper sizes from words
    like "letter" and "A0" and "ArchD". You have to be careful to delete the
    file as well.

    Thanks for your thoughts.
     
    xxxTed Schaefer, Sep 28, 2004
    #7
  8. In 2005, what if you want to Publish drawings that aren't open in the
    Yeah, good point Ted. My apps are usually automated so I know what layouts
    are there since my app created the drawing. You could open them first inn
    DBX to get the layouts, but it sounds like your workaround is working for
    you.

    -- Mike
    ___________________________
    Mike Tuersley
    CADalyst's CAD Clinic
    Rand IMAGINiT Technologies
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Sep 29, 2004
    #8
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.