VBA executable file

Discussion in 'AutoCAD' started by vijaya, Sep 3, 2004.

  1. vijaya

    vijaya Guest

    Hi,
    I'm having a VBA program which I want to load on other systems. I dont want my code to be visible nor I dont want to give the password. I want to know how to compile a VBA program.

    Thanks
     
    vijaya, Sep 3, 2004
    #1
  2. vijaya

    Kevin Terry Guest

    You can't compile a vba program into an executable. For that you'll need
    full vb.

    Kevin

    want my code to be visible nor I dont want to give the password. I want to
    know how to compile a VBA program.
     
    Kevin Terry, Sep 3, 2004
    #2
  3. vijaya

    vijaya Guest

    Thanks for the reply.
    Can you please tell me how to convert dvb file into VB exe file. Will this exe work same as dvb file ?
     
    vijaya, Sep 4, 2004
    #3
  4. You need to make a call to the Application and to the Drawing unlike VBA
    which is native to AutoCAD..

    Dim acadApp As AcadApplication
    Set acadApp = GetObject _
    (, "AutoCAD.Application.15")
    If Err Then
    Err.Clear
    Set acadApp = CreateObject _
    ("AutoCAD.Application.15")
    If Err Then
    MsgBox Err.Description
    Exit Sub
    End If
    End If

    ' Connect to the AutoCAD drawing
    Dim ThisDrawing As AcadDocument
    Set ThisDrawing = acadApp.ActiveDocument

    'Now code like you would in VBA...ie
    With ThisDrawing.
    '''''Rip it up..
    End With

    'then complile to .exe...
    gl..
    Paul
    exe work same as dvb file ?
     
    Paul Richardson, Sep 4, 2004
    #4
  5. Hi,

    You have to buy VB.
    Clip boards the code across. Read the help files to get information on the
    small changes you need to make.
    Check you code runs.
    Compile it.

    --


    Laurie Comerford
    CADApps
    www.cadapps.com.au

    exe work same as dvb file ?
     
    Laurie Comerford, Sep 4, 2004
    #5
  6. If your intention is to be able to distribute your AutoCAD VBA routines in
    compiled mode, there is more to it than just passing the code to VB.
    I'm sure you won't want to run your code out of AutoCAD's process space,
    'cause it's going to crawl.

    You'll need to create a VB Activex DLL, which besides involving a little
    more complex translation work, you'll also have to deal with the
    installation issues.

    --
    Saludos, Ing. Jorge Jimenez, SICAD S.A., Costa Rica

    exe work same as dvb file ?
     
    Jorge Jimenez, Sep 4, 2004
    #6
  7. Jorge, Does this mean it faster to call a dll from vba code than to run an
    executable?
    Thank You
    Paul
     
    Paul Richardson, Sep 5, 2004
    #7
  8. I woud say VBA is faster as it is running in process from a VB exe it has to
    run cross process.
    Also using with an exe if you have more than one Acad session running you
    cannot control which one your exe uses
     
    Mark Gardiner, Sep 5, 2004
    #8
  9. Yes
     
    Jorge Jimenez, Sep 5, 2004
    #9
  10. vijaya

    vijaya Guest

    Thanks for the reply.
    I want to call Architectural Desktop from VB. How to know the version which is installed in the users system and how to call Architectural Desktop. Can u please help me.
     
    vijaya, Sep 8, 2004
    #10
  11. vijaya

    vijaya Guest

    Hi,
    I want to create a dll and run it from VBA. Can u please help me how to translate the code to VB to create a dll.
    Thanks in advance.
     
    vijaya, Sep 8, 2004
    #11
  12. ACADVER....at the command line...
    which is installed in the users system and how to call Architectural
    Desktop. Can u please help me.
     
    Paul Richardson, Sep 8, 2004
    #12
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.