Autocad VBA and Microsoft Visual Source Safe

Discussion in 'AutoCAD' started by Davids, Jul 1, 2004.

  1. Davids

    Davids Guest

    Hi!

    It's possible to integrate the autocad VBA modules with Microsoft Visual
    Source Safe for handling the project modules, sharing some modules between
    different Autocad projects?

    Thanx in advance!

    Davids
     
    Davids, Jul 1, 2004
    #1
  2. Davids

    Ed Jobe Guest

    In VS, modules are separate files. In vba, they are compiled into a dvb, so...no. Unless you export everything in your dvb. When I want to share modules in acad vba, I just created a Toolbox.dvb and reference that dvb from the other dvb's. The only other caveat, is that, for Intellisense to work, you need to qualify the whole object heirarchy. Whereas, when the function was in the same project, you only had to specify the function's name. Now, when the function is outside the project in another dvb, you need to specify a fully qualified name, fqn, using the syntax, Project.Module.Procedure.

    --
    ----
    Ed
    ----
    Hi!

    It's possible to integrate the autocad VBA modules with Microsoft Visual
    Source Safe for handling the project modules, sharing some modules between
    different Autocad projects?

    Thanx in advance!

    Davids
     
    Ed Jobe, Jul 1, 2004
    #2
  3. Davids

    Davids Guest

    Thanx Ed...
    This may be a small solution, but you don't may evaluate the difference
    between two version of the same module...

    In the add-in manager i see the VSS add-in link but after her start the
    login dialog don't see the VSS database... There's a additional component to
    install to work?
    Also Access is a unique file, but the VSS add-in split this file in more
    files and these files are added to VSS...
    Autocad may work similary?

    Davids

    ____________________________________________________________________________
    ___

    In VS, modules are separate files. In vba, they are compiled into a dvb,
    so...no. Unless you export everything in your dvb. When I want to share
    modules in acad vba, I just created a Toolbox.dvb and reference that dvb
    from the other dvb's. The only other caveat, is that, for Intellisense to
    work, you need to qualify the whole object heirarchy. Whereas, when the
    function was in the same project, you only had to specify the function's
    name. Now, when the function is outside the project in another dvb, you need
    to specify a fully qualified name, fqn, using the syntax,
    Project.Module.Procedure.
     
    Davids, Jul 2, 2004
    #3
  4. Davids

    Ed Jobe Guest

    two version of the same module...
    The point is, using this method, I don't have two versions of the same module. All dvb's access the common module for what they need, instead of duplicating it over and over. Its like having a common dll.

    If you still MUST use vss, export the modules from the dvb (they will get saved as bas and cls files) and then bring them into vss for comparison. I havn't tried it though, but I believe that would be your only way.

    --
    ----
    Ed
    ----
    Thanx Ed...
    This may be a small solution, but you don't may evaluate the difference
    between two version of the same module...

    In the add-in manager i see the VSS add-in link but after her start the
    login dialog don't see the VSS database... There's a additional component to
    install to work?
    Also Access is a unique file, but the VSS add-in split this file in more
    files and these files are added to VSS...
    Autocad may work similary?

    Davids

    ____________________________________________________________________________
    ___

    In VS, modules are separate files. In vba, they are compiled into a dvb,
    so...no. Unless you export everything in your dvb. When I want to share
    modules in acad vba, I just created a Toolbox.dvb and reference that dvb
    from the other dvb's. The only other caveat, is that, for Intellisense to
    work, you need to qualify the whole object heirarchy. Whereas, when the
    function was in the same project, you only had to specify the function's
    name. Now, when the function is outside the project in another dvb, you need
    to specify a fully qualified name, fqn, using the syntax,
    Project.Module.Procedure.
     
    Ed Jobe, Jul 2, 2004
    #4
  5. Davids

    Davids Guest

    Ance I thought to proceed in this way... I hoped was an other way. Thanks
    for your help Ed!
    Davids

    The point is, using this method, I don't have two versions of the same
    module. All dvb's access the common module for what they need, instead of
    duplicating it over and over. Its like having a common dll.

    If you still MUST use vss, export the modules from the dvb (they will get
    saved as bas and cls files) and then bring them into vss for comparison. I
    havn't tried it though, but I believe that would be your only way.
     
    Davids, Jul 2, 2004
    #5
  6. In order to utilize VSS with my VBA (DVB) project I converted everything to
    a DLL and then just used a VBA stub. The benefits of using VSS with my code
    made it well worth it.

    Best regards,

    Dale
     
    Dale Levesque, Jul 6, 2004
    #6
  7. Davids

    Davids Guest

    Thenk you for the suggestion, but I do not know like applying it.
    You could kindly write the instructions on like making to me? Thanks!
    Davids
    __________________________________________________
     
    Davids, Jul 7, 2004
    #7
  8. I use VB 6.0 so,

    1.) Start a new ActiveX DLL Project.
    2.) Export your VBA project to individual BAS, FRM files etc.
    3.) Add these files to the DLL.
    4.) Compile the DLL.
    5.) Add the DLL reference to your DVB project.
    6.) Call the DLL routines from your DVB file using the following format:

    DLL_Name.Routine_Name

    HTH,

    Dale
     
    Dale Levesque, Jul 7, 2004
    #8
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.