Is there a NETLOAD method in VB(A)?

Discussion in 'AutoCAD' started by Maksim Sestic, Mar 10, 2005.

  1. Hi everyone,

    Am I missing something, or there is no Application.NETLOAD (or LOADNET, or whatever) method in AutoCAD 2005 Type Library? I can't stand using LISP to load .NET assemblies :)

    Regards,
    Maksim Sestic
     
    Maksim Sestic, Mar 10, 2005
    #1
  2. You can use demand loading if LISP rubs you that raw :)
    --
    Bobby C. Jones
    Hi everyone,

    Am I missing something, or there is no Application.NETLOAD (or LOADNET, or whatever) method in AutoCAD 2005 Type Library? I can't stand using LISP to load .NET assemblies :)

    Regards,
    Maksim Sestic
     
    Bobby C. Jones, Mar 10, 2005
    #2
  3. You can also have it autoloaded by the system when AutoCAD fires up

    -- Mike
    ___________________________
    Mike Tuersley
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Mar 11, 2005
    #3
  4. Mike,

    I'm aware of that, but AutoCAD's TLB has an Application.LoadARX method and I
    was wondering if there's similar mechanism for loading .NET assemblies.
    We're still using VB-based EXE startup routine for firing-up AutoCAD and
    loading bunch of ARXes, DVBs, VLXes and .NET DLLs in it... :) Since we're
    all in the middle of the process of learning C#, hopingly we'll migrate all
    of it to .NET before AutoCAD 2006 final release gets launched.

    Regards,
    Maksim Sestic
     
    Maksim Sestic, Mar 11, 2005
    #4
  5. You shouldn't be using LISP to load .net assemblies.

    You can have them loaded by creating the appropriate
    registry entries (the same way that AcLayer.dll is loaded).



    Hi everyone,

    Am I missing something, or there is no Application.NETLOAD (or LOADNET, or whatever) method in AutoCAD 2005 Type
    Library? I can't stand using LISP to load .NET assemblies :)

    Regards,
    Maksim Sestic
     
    Tony Tanzillo, Mar 11, 2005
    #5
  6. Mike,

    How is this done?
     
    Frank Oquendo, Mar 11, 2005
    #6
  7. In HKLM\Software\Autodesk\AutoCAD\R16.1\ACAD-301:409\Applications add your
    own key with the following values:

    \myApp
    "DESCRIPTION"="myApp"
    "LOADER"="C:\\wherever\\myApp.dll"
    "LOADCTRLS"=dword:00000002
    "MANAGED"=dword:00000001

    plus a sub key:
    myApp\Commands
    "StartmyApp"="StartmyApp"
    - where StartmyApp is a valid command within your app.

    Now the app will load whenever AutoCAD is started. To auto initialize it,
    you could add:

    to your code:
    <CommandMethod("dwfAutoSave")> _
    Public Sub StartmyApp()
    .....
    End Sub

    Then a call to StartmyApp in ACAD.LSP, ACAD.MNL, or anything else that
    autoloads.

    -- Mike
    ___________________________
    Mike Tuersley
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Mar 11, 2005
    #7
  8. That's good information to have. I've got a project I can apply that to
    immediately. Thank you very much.
     
    Frank Oquendo, Mar 11, 2005
    #8
  9. Any time Frank =)

    -- Mike
    ___________________________
    Mike Tuersley
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Mar 12, 2005
    #9
  10. Tony,

    I'm aware of that, but this means that _every_ time AutoCAD (or MAP) starts
    it automatically loads my DLLs. Since my application completely changes
    visual outlook of ACAD (including full menu structure) I had to rely on
    startup .EXE file which creates separate profile. There's more than 10
    custom menus, not to mention different interaction with users, and I can't
    just add new menu to the end of existing ACAD one (like MAP does). My users
    still need functionality of their original platform (ACAD, MAP...) and I
    can't schred it for the sake of my own application.

    In fact, there are two different approaches when talking of AutoCAD add-ons:
    one is Autodesk MAP's - it leaves ACAD as is, with one more additional menu.
    The opposite of that is Architectural Desktop's approach, which scraps
    underlying ACAD structure replacing most of it with it's own (status and
    tool bars, menus, options, user interaction...). I'm much closer to MAP's
    way, still there is no localized version of ACAD for my group of users so I
    need to stick somewhere in between :)

    Regards,
    Maksim Sestic


    whatever) method in AutoCAD 2005 Type
     
    Maksim Sestic, Mar 12, 2005
    #10
  11. Sorry. I don't follow. Your DLL can be nothing but a proxy
    that decides what else to do in real-time, for each user,
    or each drawing, or a combination of both.
     
    Tony Tanzillo, Mar 12, 2005
    #11
  12. Maksim Sestic

    Ed Jobe Guest

    Hey Mike, just checking on the double backslashes in the value for Loader? I
    don't usually see double backslahes in the reg.
     
    Ed Jobe, Mar 14, 2005
    #12
  13. Ed, I use double back slashes also. Haven't tried
    single forward. Paul
     
    Paul Richardson, Mar 15, 2005
    #13
  14. Yeah, double has always worked for me, too.

    -- Mike
    ___________________________
    Mike Tuersley
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Mar 15, 2005
    #14
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.