Size limit for dvb file

Discussion in 'AutoCAD' started by Michi Ishii, Oct 19, 2004.

  1. Michi Ishii

    Michi Ishii Guest

    Somebody,
    Please tell me the maximum size limit for dvb file.
    When I modified dvb file and try to save this,
    I got AutoCAD Error Aborting message called "FATAL ERROR : Unhandled
    Access Violation Reading 0x326f1fc Eception at 65106be1h" and crashed.
    Size of my dvb file is 7.7MB and I use AutoCAD2004.
    Please advise.
    Michi
     
    Michi Ishii, Oct 19, 2004
    #1
  2. Michi Ishii

    Ed Jobe Guest

    That error message has nothing to do with file size, but system RAM.
    Although, the file is large (depending on what you have in it), the
    important thing now is, can you open the file? You will have lost some work,
    but is the file ok? Is the error repeatable?
     
    Ed Jobe, Oct 19, 2004
    #2
  3. Michi Ishii

    Michi Ishii Guest

    Jame and Ed
    Thank you very much for your response.
    I can open dvb file and can edit it, too.
    Then whenever I try to save that, message come out and AutoCAD crash.
    This is repeatable.
    Michi
     
    Michi Ishii, Oct 19, 2004
    #3
  4. Michi Ishii

    Ed Jobe Guest

    Try Debug>Compile. If there is a problem with your code, it will jump to the
    problem area. Fix and repeat until it compiles without error.
     
    Ed Jobe, Oct 19, 2004
    #4
  5. That still may not fix it....in the back of my mind, I recall a
    conversation I had with an adesk programmer and I believe there is an 8mb
    size limit but I'm not 100% sure.

    -- Mike
    ___________________________
    Mike Tuersley
    CADalyst's CAD Clinic
    Rand IMAGINiT Technologies
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Oct 19, 2004
    #5
  6. Michi Ishii

    Ed Jobe Guest

    I hadn't addressed size limit, but I wonder what he has in there. All of my
    stuff doesn't add up to even 3mb. Michi, do you have vb controls on your
    forms? e.g. common dialog control? Besides not being licensed for vba, they
    can add a lot of bytes to a dvb.
     
    Ed Jobe, Oct 19, 2004
    #6
  7. I hadn't addressed size limit,

    Sorry, I didn't mean to imply that you had, Ed =)
    Also, how do you write you code - in lisp fashion? Being a consultant, I've
    run into a lot of dvbs where they could be 10x smaller if they were
    modularized. As Ed says, I write some hefty high end code and 1mb is
    pushing the envelope for me.

    -- Mike
    ___________________________
    Mike Tuersley
    CADalyst's CAD Clinic
    Rand IMAGINiT Technologies
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Oct 20, 2004
    #7
  8. Michi Ishii

    Tom Roberts Guest

    I don't claim to be a programming expert and I would have trouble passing
    myself off as a consultant, but as the smuck that is lumbered with writing
    in-house routines I reckon I write pretty clean code.

    Having said that my current project has very quickly hit 1.2MB and is
    nowhere near complete
    15 class modules,
    5 forms and,
    6 modules
    Interestingly if the project is exported as text files the sum of all the
    files <200k

    I am well aware that most of the code could (should) be compiled as a dll.
    Is this what you mean by being modularised.
    When (read if) I get around to compiling it my dvb should consist of about a
    dozen lines.

    Until then I watch this thread, and my file size, with interest.

    --
    Regards
    Tom Roberts
    __________________________
    MechWest Design & Drafting
    Perth, Western Australia
     
    Tom Roberts, Oct 20, 2004
    #8
  9. What version of AutoCAD? Assuming you follow Ed's instructions about not
    using VB controls, then export your different mods/forms, start a new
    project, then import the exported mods/forms. AutoCAD's VBAIDE does add
    slop especially if you are using 2002/2000i/2000. For what you have listed,
    there is definitely a problem somewhere.

    To re-hash Ed's statement, because many don't understand, you are only
    allowed to use the controls that appear in the toolbox with a clean install
    - no grids, no data controls, no dialog controls, etc. Even the savy
    programmer can bloat the dvb because he resorts to free or purchased
    controls which are some times worse than the MS ones.
    No...modularize is probably a poor choice of words. Compartmentalize.
    Redundancy-proofing. Refactoring.....

    Some people will write the entire program within a single sub. Some will
    pull out redundant tasks but create multiples [insert block, insert block
    and rotate it, insert block and change its layer - silly examples but you
    should get the idea]. FInally, some pull out the redundant tasks and roll
    all of them into a single task with parameters so it can perform all the
    different tasks within one sub/function.

    Another common mis-code is adding all kinds of default info into the dvb.
    For example, one particular place had every single product they made
    hardcoded within the project. Not only did it bloat the dvb but they had to
    go into it to add/remove/change their product. In this case, they needed to
    store the info externally and read it in at runtime.

    -- Mike
    ___________________________
    Mike Tuersley
    CADalyst's CAD Clinic
    Rand IMAGINiT Technologies
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Oct 20, 2004
    #9
  10. Michi Ishii

    Jürg Menzi Guest

    Hi Michi

    Did you tried 'Save As'? A dvb grows during work and the only way to resize
    it is to use 'Save As'.
    You will get also a problem if you copy / paste a foreign control from one
    form to another.

    Cheers
     
    Jürg Menzi, Oct 20, 2004
    #10
  11. I never ran into size limit problems, and my apps were really big. If I recall right, before porting most of the code to independant DLL/ARX files I had following situation (ACAD 2000/2002):

    DVB size: 10.4 Mbs
    BAS modules: 20 (about 30+ functions/subs per module)
    FRM modules: 25
    CLS modules: 16 (about 40+ properties/methods per class)

    And everything worked just fine. As James proposed, try exporting and importing project components to avoid size-expanding problems, then check for external components you're possibly referencing. Also try reinstalling ACAD.

    Regards,
    Maksim Sestic


     
    Maksim Sestic, Oct 20, 2004
    #11
  12. Michi Ishii

    Michi Ishii Guest

    Everyone,
    Thank you very much for all your help.
    I export all my form, module, and class and import them to create new
    dvb file. File size reduced from 7.7MB to 3.3MB and it works OK now.
    In addtion, during exporting each class, I found that specific one of
    classes cause fatal error when I tried to do something such as copy, export,
    print, and so on.
    I could see that class but it refuse some action that crash autocad. I
    have never modified this class since I created in AutoCAD2000 but when I
    saved whole dvb file in 2004, it effect this class and may have collapse
    some format in it. I confirm that class produced fatal error but still not
    clear in reason.
    Again, Thank you very much for your helpful advise.
    Michi
     
    Michi Ishii, Oct 20, 2004
    #12
  13. Michi Ishii

    Tom Roberts Guest

    Thanks for you comments Mike

    For the record I don't have a problem with the file size of my project.
    I will only have a problem if AutoCAD/VBA decides my project is to big and
    creates a problem for me.
    The OP asked if there was a size limit and I don't think this has (can?)
    been definitively answered.

    However...
    Since I hang onto every word of experts like yourself ;-)
    I have looked at a few of your (and others) suggestion:

    1. I use two custom controls:
    AcFocusCtrl, available for download on these newsgroups.
    and ccrpFD.ocx a file dialog control by the Common Control Replacement
    Group.
    Both I believe are open-source, however since they do not appear in the
    toolbox are you saying I can not use them?

    2. I saved as a new file name and the file size dropped 1,257KB ->
    760KB...very interesting!

    --
    Regards
    Tom Roberts
    __________________________
    MechWest Design & Drafting
    Perth, Western Australia
     
    Tom Roberts, Oct 21, 2004
    #13
  14. 1. I use two custom controls:
    Ships with AutoCAD so it isn't a custom control.
    No you can use them. Its the Microsoft stuff that can't be used. The CCRP
    stuff can be expensive in terms of dvb size.
    Known issue - there is a lot of "air" in a dvb =)


    -- Mike
    ___________________________
    Mike Tuersley
    CADalyst's CAD Clinic
    Rand IMAGINiT Technologies
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Oct 21, 2004
    #14
  15. Michi Ishii

    Ed Jobe Guest

    Not really "air", compiled code...
    Tom, the "code" you see on the screen is just text. It has to be compiled
    into a form that the computer can run. In VB, basically, your project
    consists of text files alone. When you have your project done, you compile
    to an exe or dll. But in vba, esp a dvb, the compiled code is saved with the
    text or "pseudo code". When you SaveAs, the code is not compiled and so you
    only get the pseudo code in th dvb. If you Debug>Compile, then the file size
    would come back up to where it was.
     
    Ed Jobe, Oct 21, 2004
    #15
  16. Hi Mike,

    Before we fully understood the hell of file size increase every time you
    open it and edit anything, the Advanced Roads Program was up to 25Mb and
    still working well.

    We now do a Debug Compile, following by Saveas, unload, reload the "Savedas"
    file and Saveas again to hold the release versions around the 7Mb size. The
    first Saveas varies from 10 to 12Mb.


    --

    Regards,


    Laurie Comerford
    www.cadapps.com.au
     
    Laurie Comerford, Oct 23, 2004
    #16
  17. Michi Ishii

    Ed Jobe Guest

    What happens to file size if you do SaveAs and then Debug>Compile?
     
    Ed Jobe, Nov 1, 2004
    #17
  18. Hi Ed,

    From memory, not much different. Since I started using debug compile a
    couple of months ago I do it all the time and it has lead to identifying
    numerous errors in my old programs as I open them to port the code to later
    versions of AutoCAD. I think the SaveAs/Reload is the critical part of the
    exercise

    Back to Advanced Road Design, I think, initially it dropped to about the 8
    to 10Mb range, but the code has changed so much from those days, there is no
    way of checking without re-loading Land Desktop 3 and diving into the
    archives to get early versions of the program..

    --


    Laurie Comerford
    CADApps
    www.cadapps.com.au
     
    Laurie Comerford, Nov 1, 2004
    #18
  19. Michi Ishii

    Ed Jobe Guest

    The reason I asked was, SaveAs is not a indicator of true file size. See my
    last reply to Mike in this thread.
     
    Ed Jobe, Nov 1, 2004
    #19
  20. Hi Ed,

    The whole system is very confusing.

    I've done SaveAs for a file to a new name and had a resultant file size (All
    sizes as seen by Windows Explorer)
    Then repeat to another new name and get a different file size (usually
    smaller)
    Then repeat again and get another file size.
    Repeat and save to an existing file and get another size again - nearly
    always larger and sometimes significantly larger

    As I said before I now follow the standard pattern of:
    Complete all editing I want
    Debug.Compile
    VBAMAN
    SaveAs to Project.dvb (the default and saves typing)
    Unload
    Windows Explorer and delete the orginal file if it exists
    Load Project.dvb
    SaveAs to the original file name I want.


    Laurie Comerford
    CADApps
    www.cadapps.com.au

    <snip>
     
    Laurie Comerford, Nov 1, 2004
    #20
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.