Results 1 to 6 of 6

Thread: Developing in .NET for AutoCAD

  1. #1
    Active Member
    Join Date
    2013-06
    Posts
    72
    Login to Give a bone
    0

    Default Developing in .NET for AutoCAD

    Ok, so I am finally figuring out how to use .NET and making simple DLLs for AutoCAD. However, this is how I am doing it, and it's pretty cumbersome:

    1) Make adjustments to code, make sure VisualStudio is happy with syntax.
    2) Build code to .dll
    3) Load AutoCAD
    4) Load DLL
    5) Test DLL
    6) Turn off AutoCAD

    Is this how I am supposed to be doing it? It's pretty cumbersome, especially coming from VBA where I just click "go" and it starts doing stuff.

  2. #2
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,416
    Login to Give a bone
    0

    Default Re: Developing in .NET for AutoCAD

    Just hit F5 and it will compile the code and start acad. Normally, you would type NETLOAD and begin debugging. If I'm doing a lot of coding, I'll put a line in my mnl like (netload "pathToDebugDll") and this will autoload your dll. For autocad to run at F5, you have to set your project properties on the Appllication tab. If you are using Express, you have to manually edit the *.proj file.
    C:> ED WORKING....


    LinkedIn

  3. #3
    Active Member
    Join Date
    2013-06
    Posts
    72
    Login to Give a bone
    0

    Default Re: Developing in .NET for AutoCAD

    Thank you; didn't know about that feature (quite nice); I have Visual Studio Ultimate 2013 (benefits of a friend being a programmer at M$) so I found it in the "DEBUG" tab.

    I also had no idea what was meant by that "MNL" editing, but Google provided some help on that one too, so I have it all setup.

    This is a lot nicer, especially given I am just learning .NET, so NOTHING I program works for the first 100 tries (at least). Cheers!

  4. #4
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: Developing in .NET for AutoCAD

    Quote Originally Posted by Ed Jobe View Post
    Just hit F5 and it will compile the code and start acad. Normally, you would type NETLOAD and begin debugging. If I'm doing a lot of coding, I'll put a line in my mnl like (netload "pathToDebugDll") and this will autoload your dll. For autocad to run at F5, you have to set your project properties on the Appllication tab. If you are using Express, you have to manually edit the *.proj file.
    I just build to relative path for a given app's .bundle from my Google Drive folder (subversioned with Tortoise) to %AppData%\Autodesk\ApplicationPlugins\<AppName>.bundle\... folder, at which point AutoCAD loads the appropriate assembly for the version I'm debugging at Initialize() automagically (via registry loader built for me by Autoloader mechanism).

    Cheers
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  5. #5
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,416
    Login to Give a bone
    0

    Default Re: Developing in .NET for AutoCAD

    Quote Originally Posted by BlackBox View Post
    I just build to relative path for a given app's .bundle from my Google Drive folder (subversioned with Tortoise) to %AppData%\Autodesk\ApplicationPlugins\<AppName>.bundle\... folder, at which point AutoCAD loads the appropriate assembly for the version I'm debugging at Initialize() automagically (via registry loader built for me by Autoloader mechanism).

    Cheers
    Do you compile both debug and release configurations to the same path? I've never messed with version mgmt software as I don't do that much and only for in-house.
    C:> ED WORKING....


    LinkedIn

  6. #6
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: Developing in .NET for AutoCAD

    Quote Originally Posted by Ed Jobe View Post
    Do you compile both debug and release configurations to the same path? I've never messed with version mgmt software as I don't do that much and only for in-house.
    Yes - when you build to either ..\debug\ or ..\release\ using OOTB defaults, the existing file is either overwritten, or deleted, and replaced with current build. You *can* change the build for either to include build nomenclature, but that is well beyond the scope of my development efforts.

    This methodology (building to .bundle), simply does the grunt work for me, and I merely need to specify the relative path in Project Properties once, as most of my work is delivered in Autoloader format anyway (even in-house), it makes it really easy to test how user would work, and how multiple plug-ins work together (or don't; it is debug!).

    No more including an .MNL, or AcadDoc.lsp in ..\debug\, etc., just 'debug' and go.

    As for SVN, I have only ever messed with it previously working for an out of state AutoCAD developer as a consultant, and today have it for the purposes of obtaining the source of a popular 3rd party C3D package (I just happened to change employers immediately after NDA, which has been a double edged sword *kicks dirt*).

    Cheers
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

Similar Threads

  1. CP333-3: Developing a Cocoa-Based UI for AutoCAD® Mac
    By Autodesk University in forum Customization and Programming
    Replies: 0
    Last Post: 2015-08-07, 05:20 PM
  2. CP208-1: AutoCAD .NET: Developing for AutoCAD Using IronPython and IronRuby
    By Autodesk University in forum Customization and Programming
    Replies: 0
    Last Post: 2014-12-01, 01:56 AM
  3. CP304-4: AutoCAD .NET: Developing a User Interface Using WinForms
    By Autodesk University in forum Customization and Programming
    Replies: 0
    Last Post: 2014-12-01, 01:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •