Loading another .dvb

Discussion in 'AutoCAD' started by michael montagne, Feb 18, 2004.

  1. From a VBA routine, how do you call a routine from a .dvb file that is
    not loaded yet?

    -mjm
     
    michael montagne, Feb 18, 2004
    #1
  2. Straight from one of my projects.

    LoadDVB "Z:\RAA_UTIL04\RAA.dvb"
    RunMacro "Startup.Startup"

    Regards - Nathan
     
    Nathan Taylor, Feb 18, 2004
    #2
  3. michael montagne

    Ben Guest

    Add it as a reference into your first .dvb
     
    Ben, Feb 18, 2004
    #3
  4. I knew about that one. But it doesn't work so well in this case cause
    most of the time it won't be called.
     
    michael montagne, Feb 18, 2004
    #4
  5. michael montagne

    Ben Guest

    Let me make sure I'm understanding what you are looking for.

    You have projectA

    Inside projectA are subs or modules, or something....

    Now you have projectB

    From inside projectB, you will sometimes call items that are already
    subroutines inside projectA

    You are looking for a "demand load and then release" type of binding
    there? Wherein the second project is loaded only when needed, and then
    unloaded?
     
    Ben, Feb 18, 2004
    #5
  6. michael montagne

    Ben Guest

    Oh wait. I think I understand what it was you were after now.

    Hold on.....
     
    Ben, Feb 18, 2004
    #6
  7. michael montagne

    Ben Guest

    See, told you it would be an easy answer for someone else.


    sigh...
     
    Ben, Feb 19, 2004
    #7
  8. michael montagne

    Kevin Terry Guest

    Public Sub BillOfMaterial()

    Const sProject As String = "T:\Engineering
    Supt\ProgrammingData\jproBOM.dvb"
    Const sMacro As String = "jproMainBom.NewBom"
    'jproMainBom is the module name
    'NewBom is the macro name

    'open file
    LoadDVB sProject

    'macro to run
    RunMacro sMacro

    'close file
    UnloadDVB sProject

    End Sub


    HTH,
    Kevin
     
    Kevin Terry, Feb 19, 2004
    #8
  9. Excellent. That's it! Thanks.
     
    michael montagne, Feb 19, 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.