Author Topic: Vanilla load  (Read 4266 times)

0 Members and 1 Guest are viewing this topic.

Matersammichman

  • Guest
Vanilla load
« on: May 23, 2006, 05:32:04 PM »
When you open CAD, ACADProject(Global1) is opened.
I'd like to have CAD load a dvb on startup, so I'm thinking I may want to edit "whatever" brings this up.
Suggestions? :pissed:

CmdrDuh

  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Re: Vanilla load
« Reply #1 on: May 23, 2006, 05:38:19 PM »
well, that is an interesting question b/c there are a number of things you could edit to load dvb files.  What are you familiar with editing?  You could create a LISP file that loads DVB files, or put them in your Startup Suite (I wouldn't, but you could). 
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second

Bob Wahr

  • Guest
Re: Vanilla load
« Reply #2 on: May 23, 2006, 05:58:06 PM »
(I wouldn't, but you could).
I disagree with Mr. Duh on that one.  If you want them loaded at startup, especially if they're going to be running in the background, I see no reason at all not to put them in the startup suite.  You can also use an ACAD.DVB as an automatically loaded loader.

CmdrDuh

  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Re: Vanilla load
« Reply #3 on: May 23, 2006, 06:07:25 PM »
I dont use the suite b/c sometimes it freaks out and doesn't load things.  I do use it for some things, but I use the MNL file to load our routines.  I also have a loader function in LISP that checks for the function and loads the dvb if necessary when you call the routine
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Vanilla load
« Reply #4 on: May 23, 2006, 06:13:55 PM »
....  but I use the MNL file to load our routines. I also have a loader function in LISP that checks for the function and loads the dvb if necessary when you call the routine

yep ... that way the Partial menu controls what is loaded via the MNL .. works for me.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<--

Bob Wahr

  • Guest
Re: Vanilla load
« Reply #5 on: May 23, 2006, 06:16:15 PM »
Agree that there's no reason to load them until needed and the loader lisp is great for that, I have two VBA programs that run in the background constantly.  I've never had a problem with the startup suite freaking or at least have never noticed it.

CmdrDuh

  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Re: Vanilla load
« Reply #6 on: May 23, 2006, 06:20:51 PM »
me either, but I have seen complaints in threads here. (I cant think of where I saw it, just making note of it)
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second

Jürg Menzi

  • Swamp Rat
  • Posts: 597
  • Oberegg, Switzerland
Re: Vanilla load
« Reply #7 on: May 24, 2006, 02:39:39 AM »
There is normally no need to preload a VBA module...

In a menu macro type:
-VBARUN;MyApp.dvb!MacroFunctions.MyFunction
The MyApp.dvb file is loaded and the macro is executed. The MyApp.dvb file remains loaded once the macro has been completed.
The dvb module must be in a path of the AutoCAD environment, else you've to specify the full path in the call.
A computer's human touch is its unscrupulousness!
MENZI ENGINEERING GmbH
Current A2k14... A2k18 - Start R2.18

Glenn R

  • Water Moccasin
  • Posts: 1932
  • What idiot child of married cousins wrote this?!
Re: Vanilla load
« Reply #8 on: May 24, 2006, 06:32:12 AM »
It all depends on WHEN you want the startup code to be run.

Adding it into the startup suite/mnl etc. is almost in the last stages of the Acad load process and you will also take the hit of the acadvba/acvba.arx loading at that time.

The absolute best way is to toss an "acad.rx" file into your search path and in that put a line "acadvba.arx" or "acvba.arx" - depends on the version of acad you're running.
This makes sure the VBA interpreter arx is loaded with all the other startup arx files.

You then put an "Acad.dvb" file in the search path - this is vba's equivalent of acad.lsp...it will autoload. If you then want something to execute at startup from Acad.dvb, put a public sub called AcadStartup into a public module and any code in that will be executed when acad starts.

This method will make sure you stuff runs BEFORE any associated lisp/startup suite stuff...all depends on what you want (read - this is the way I ALWAYS do it).

Cheers,
Glenn.
Me

CmdrDuh

  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Re: Vanilla load
« Reply #9 on: May 24, 2006, 12:21:34 PM »
Thats what I do  ^    .  And it works really well
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second

Matersammichman

  • Guest
Re: Vanilla load
« Reply #10 on: June 15, 2006, 12:35:37 PM »
"Why" I want to do this...
I have to take a dvb file and place it on every computer in the workplace.
Our CAD systems are pathed to one global folder for "common" files.
If I can hardcode something that loads from a globally accessed common file on every computer, it will prevent me from having to go to every workstation and add the dvb file into the Startup Suite.
Comments? :lol:

CmdrDuh

  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Re: Vanilla load
« Reply #11 on: June 15, 2006, 12:46:45 PM »
I would make it acad.dvb, put it in that folder, and it will load from every machine
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second

Bob Wahr

  • Guest
Re: Vanilla load
« Reply #12 on: June 15, 2006, 12:49:31 PM »
One word of caution on shared DVBs.  A DVB, unlike a LSP, when loaded is locked.  Everyone can use it at the same time but it cannot be modified, replaced, etc. until it is closed on all machines.  Depending on how many seats you have it could be a hassle.

CmdrDuh

  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Re: Vanilla load
« Reply #13 on: June 15, 2006, 03:48:59 PM »
I agree 100% with Bob, as I deal with this all the time.  I keep a separate set of dvb files for editing, and have an update routine that copies them to the server at night when noone is using the network versions
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second

Bryco

  • Water Moccasin
  • Posts: 1849
Re: Vanilla load
« Reply #14 on: June 16, 2006, 12:00:53 AM »
I also read you can't run more than 20 cads using the same vba due to a bug. Ouch.