Author Topic: Best way to Lower File Size  (Read 2428 times)

0 Members and 1 Guest are viewing this topic.

Kheilmann

  • Guest
Best way to Lower File Size
« on: September 20, 2007, 11:03:25 AM »
I've cleaned out a lot of my code, and removed old forms, etc.; however, the size of my
files either stay the same or increase.  I remember something about Compile on Command, but
not quite sure what it was. 

Thanks in advance for you help

Kevin

Chuck Gabriel

  • Guest
Re: Best way to Lower File Size
« Reply #1 on: September 20, 2007, 11:08:46 AM »
Have you tried exporting all of your forms, modules and class modules, and then rebuilding the project from them?  That will typically get you a smaller dvb file.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Best way to Lower File Size
« Reply #2 on: September 20, 2007, 11:19:53 AM »
VBA is notorious for maintaining dead code in the file. Use Chuck's resolution and the files should be much smaller.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

Guest

  • Guest
Re: Best way to Lower File Size
« Reply #3 on: September 20, 2007, 11:21:18 AM »
I've noticed that simply doing a SAVE AS creates a much smaller file.

Kheilmann

  • Guest
Re: Best way to Lower File Size
« Reply #4 on: September 20, 2007, 11:29:02 AM »
Thank You.  Worked well. 

Kheilmann

  • Guest
Re: Best way to Lower File Size
« Reply #5 on: September 20, 2007, 11:34:05 AM »
My VBA (AutoCAD 2006) does not have a SAVE AS, just a SAVE.
Also, there is not a NEW Project.  In order to start a Project from Scratch, I have
to unload all current programs, and then the Global program will be available for me to
start developing.  And when I click "SAVE" here, it asks for location & name; however if the
DVB file was already saved, then it just resaves, there is no option to SAVE AS.

Am I missing something?

Thanks again for all your help.  My file shrunk from 4.8 Mb to 800 KB.
Also, how often should I export & import into a new file?  Seems like there should be
a way to Compile or decompile, etc. ????

Thanks again,

Kevin

Guest

  • Guest
Re: Best way to Lower File Size
« Reply #6 on: September 20, 2007, 11:36:16 AM »
VBAMAN has a SAVE AS button.

deegeecees

  • Guest
Re: Best way to Lower File Size
« Reply #7 on: September 20, 2007, 11:44:32 AM »
...there is no option to SAVE AS.

Am I missing something?

This is what you're missing:

Quote
Readme for the Menu Modification Sample

This Readme contains information about the Menu Modification sample.

=================
To Use the Sample
=================

The sample comprises two AutoCAD® VBA project (DVB) files. The acad.dvb
file calls the custom_menu.dvb file.

The sample adds items to the File menu in the AutoCAD VBA integrated development
environment (IDE), creates an AutoCAD menu in the IDE, and creates a toolbar in
AutoCAD®.

To use the sample
-----------------
1. Start AutoCAD and drag the acad.dvb file into AutoCAD.

2. On the AutoCAD Tools menu, click Macro > Macros.

3. In the Macros dialog box, in the Macro list, select the ACADStartup macro
   in acad.dvb.

4. Click Run.


deegeecees

  • Guest
Re: Best way to Lower File Size
« Reply #8 on: September 20, 2007, 11:47:37 AM »
Alternately, you could move the files 'acad.dvb', and 'custom_menu.dvb' to a directory in the Acad support path, then they run automatically when AutoCad starts.