Corrupt DVB recovery

Discussion in 'AutoCAD' started by John Goodfellow, Jun 9, 2004.

  1. I have a .Dvb in 2004 that has gone corrupt on me. It causes AutoCAD to go
    "Not Responding" when I try to bring up the VBA IDE on it. Same thing
    happens when I try a "Save As" in the VBA Manager. I do have a day-old
    backup, but it's been a long day. Anyone know how to get it back?

    Thanks.
    John Goodfellow
     
    John Goodfellow, Jun 9, 2004
    #1
  2. There is no joy, oh joyless one.

    --
    R. Robert Bell


    I have a .Dvb in 2004 that has gone corrupt on me. It causes AutoCAD to go
    "Not Responding" when I try to bring up the VBA IDE on it. Same thing
    happens when I try a "Save As" in the VBA Manager. I do have a day-old
    backup, but it's been a long day. Anyone know how to get it back?

    Thanks.
    John Goodfellow
     
    R. Robert Bell, Jun 10, 2004
    #2
  3. Anyone know what the causes of such corruptions?
    Thanks
    John
     
    John Goodfellow, Jun 10, 2004
    #3
  4. John Goodfellow

    Jürg Menzi Guest

    John

    One possible reason:
    You copied third party controls from one form to another.

    Cheers
     
    Jürg Menzi, Jun 10, 2004
    #4
  5. John Goodfellow

    MP Guest

    I don't know the cause but I've had many dvbs go bad over time.
    I thought it may have to do with editing bas, cls, and frm modules in both
    vba and vb6
    but have gotten no confirmations the times i've posted about this question.
    the only thing that saves me is i save the bas, cls, and frm files back to
    drive each time they're edited so even if the dvb gets corrupted i don't
    lose the code itself.
    you can open a bad dvb with notepad and get the list of referenced modules
    with no problem then manually rebuild the dvb by importing the saved
    modules(thats the painful part) - but at least no code is lost that way.
     
    MP, Jun 10, 2004
    #5
  6. Ed Jobe has suggested several times to use compile before you save, just in
    case something is wrong. I'm always forgetting to, myself.

    --
    R. Robert Bell


    Anyone know what the causes of such corruptions?
    Thanks
    John
     
    R. Robert Bell, Jun 10, 2004
    #6
  7. John Goodfellow

    Ed Jobe Guest

    You know what got me in the habit? The Project Browser...The position of open modules and whether a folder is expanded or not is saved when you compile. I have several dvb's that are always loaded and I got tired of everything cluttering up the screen when I start the ide. So before I close the ide, I collapse folder and close modules then compile. Now when I come back, everything is neat. Also, I havn't had one corruption in the last few years. But I have caught a few compile errors. Fixing them before saving and closing prevents corruption. I have had *some* success opening the dvb on another machine. Its been awhile, but I think there was something different about the other machine that led me to try it. Maybe that I was on XP and the other machine still had NT? Its worth a try.

    --
    ----
    Ed
    ----
    Ed Jobe has suggested several times to use compile before you save, just in
    case something is wrong. I'm always forgetting to, myself.

    --
    R. Robert Bell


    Anyone know what the causes of such corruptions?
    Thanks
    John
     
    Ed Jobe, Jun 10, 2004
    #7
  8. John Goodfellow

    wivory Guest

    Like MP, I save my code to text files as I develop. He didn't say how he does it, but I have my program do it automatically every time it runs so I don't even have to think about it.

    To be honest it's saved me several times not from corruptions but rather lockups. When I'm making changes to a working program I tend not to Save it until I've tested it to prove it works. Sometimes AutoCAD has frozen so I never get the chance to save, but luckily the program has backed itself up before running so it's a 30-second job to get my code back!

    Code:
    Private Sub Main()
    If Not ThisDrawing.Application.VBE.ActiveVBProject.Saved Then LocalBackup
    ...
    End Sub
    '
    Private Sub LocalBackup()
    Dim I%, NowString$, ProjectPart As Object
    
    NowString$ = Format$(Now, "yyyymmddhhnnss")
    For I% = 1 To ThisDrawing.Application.VBE.ActiveVBProject.VBComponents.Count
    Set ProjectPart = ThisDrawing.Application.VBE.ActiveVBProject.VBComponents(I%)
    ProjectPart.Export Environ("UserProfile") & "\My Documents\" & ProjectPart.Name & NowString$ & Switch(ProjectPart.Type = 1, ".bas", ProjectPart.Type = 2, ".cls", ProjectPart.Type = 3, ".frm", ProjectPart.Type = 100, ".cls", 1 = 1, "")
    Next I%
    Debug.Print "Local Backup " & NowString$
    End Sub
    
    Regards

    Wayne Ivory
    IT Analyst Programmer
    Wespine Industries Pty Ltd
     
    wivory, Jun 11, 2004
    #8
  9. Hmm, must upgrade my wet-ware, and try to remember that! ;^)

    --
    R. Robert Bell


    You know what got me in the habit? The Project Browser...The position of
    open modules and whether a folder is expanded or not is saved when you
    compile. I have several dvb's that are always loaded and I got tired of
    everything cluttering up the screen when I start the ide. So before I close
    the ide, I collapse folder and close modules then compile. Now when I come
    back, everything is neat. Also, I havn't had one corruption in the last few
    years. But I have caught a few compile errors. Fixing them before saving and
    closing prevents corruption. I have had *some* success opening the dvb on
    another machine. Its been awhile, but I think there was something different
    about the other machine that led me to try it. Maybe that I was on XP and
    the other machine still had NT? Its worth a try.
     
    R. Robert Bell, Jun 11, 2004
    #9
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.