DVB saveas kills events

Discussion in 'AutoCAD' started by xxxTed Schaefer, Apr 28, 2004.

  1. I have a DVB that hooks events like BeginCommand. Normally
    I use Saveas to compact the dvb. Recently, every time I do this
    the new, smaller DVB, stops recognizing events. I have also
    tried the export all and re-import into a new module trick and
    that leaves me with broken events as well.

    The code has contained for some time:
    Public WithEvents oACADAppStartup As AcadApplication
    Public WithEvents oAcadDoc As AcadDocument

    If I comment out oAcadDoc and related code, the events
    are restored to the built-in AcadDocument_BeginCommand.

    Does anyone have any ideas?

    - Ted Schaefer
    WD Partners
     
    xxxTed Schaefer, Apr 28, 2004
    #1
  2. What version of AutoCAD?
     
    Mike Tuersley, Apr 28, 2004
    #2
  3. Sorry - 2004 and 2005
    Does that mean you've heard of it? :)
     
    xxxTed Schaefer, Apr 28, 2004
    #3
  4. Sorry, no. Pre2002 required compacting of the DVB but it hasn't been
    necessary in 2004/2005.

    Mike
     
    Mike Tuersley, Apr 28, 2004
    #4
  5. If the project is being reset by the SaveAs, then
    all objects (including those that fire events) are
    reset to Nothing.

    If you can't reset the project after doing a SaveAs,
    then that means the project was reset by the SaveAs.
     
    Tony Tanzillo, Apr 29, 2004
    #5
  6. Compacting may not be necessary, but it continues reduce file size.
     
    xxxTed Schaefer, Apr 29, 2004
    #6
  7. xxxTed Schaefer

    Ed Jobe Guest

    Not only is it not necessary, its pointless. If doing so means that it "continually" reduces file size, it also means that file size "continually" increases. That is a sign that it is normal. This is because a dvb includes compiled code besides the pseudo code you see in the editor. The file grows when it adds back the compiled code you took out by saving it as a text file. Here's a Google search on dvb bloat. http://tinyurl.com/26a43.
     
    Ed Jobe, Apr 29, 2004
    #7
  8. I understand. That's why there are 3 sizes. 560Kb for text only. 1Mb bloated,
    750kb after saveas and compile. Still no one has heard another case where
    saveas affect the file consistently.

    - Ted
    Not only is it not necessary, its pointless. If doing so means that it "continually" reduces file size, it also means that file size "continually" increases. That is a sign that it is normal. This is because a dvb includes compiled code besides the pseudo code you see in the editor. The file grows when it adds back the compiled code you took out by saving it as a text file. Here's a Google search on dvb bloat. http://tinyurl.com/26a43.
     
    xxxTed Schaefer, Apr 29, 2004
    #8
  9. Well, looking past the fact that you don't need to do it, have you tried it
    on another workstation? Could be your install, or something you've added
    while devevloping stuff. I'd try that route and see if it is reproducable.
     
    Mike Tuersley, Apr 29, 2004
    #9
  10. xxxTed Schaefer

    wivory Guest

    Please see the new post I've made "SelfCompact Routine for DVB Bloat".

    Regards

    Wayne Ivory
    IT Analyst Programmer
    Wespine Industries Pty Ltd
     
    wivory, Apr 30, 2004
    #10
  11. Thanks, I'll give it a try.
     
    xxxTed Schaefer, Apr 30, 2004
    #11
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.