Results 1 to 3 of 3

Thread: VB.Net Netload DLL and Windows forms (EXE)

  1. #1
    100 Club KevinBarnett's Avatar
    Join Date
    2001-10
    Location
    Pretoria, South Africa
    Posts
    119

    Question VB.Net Netload DLL and Windows forms (EXE)

    I know I know that title does not make sense. I need help, or even a gentle hint of the right direction.

    I successfully made a Class in VB.Net and compiled a DLL that loaded with AutoCAD's Netload command (references to acdbmgd.dll and acmgd.dll):

    Imports Autodesk.AutoCAD.ApplicationServices
    Imports Autodesk.AutoCAD.EditorInput
    Imports Autodesk.AutoCAD.Runtime
    Public Class Class1
    <CommandMethod("HelloWorld")> _
    Public Sub HelloWorld()
    Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
    ed.WriteMessage("Hello World")
    End Sub
    End Class

    In a seperate VB.Net project I used a Windows form to search our SQL database for standard drawings records - it compiles to an exe.

    Now I want to merge the two and make a DLL that can be loaded by Acad's netload, making a command that will display the windows form.

    I opened the project that includes the windows form and added a class similar to the one above except the command code inside the CommandMethod is:
    dim Frm as New Form1
    frm.show()

    I just cant locate where to compile it to a DLL, so I can load it with Netload.

    It's ok I can take it, tell me just how many things I did wrong.

    Thx.

    Kevin.
    Acad 2007, Autodesk Map 3D 2007, 3D, VBA, Lisp, C#.Net, Windows XP Pro (been using AutoCAD since 1989)

  2. #2
    100 Club
    Join Date
    2000-11
    Location
    Adelaide, South Australia
    Posts
    116

    Default Re: VB.Net Netload DLL and Windows forms (EXE)

    In the Solution Explorer right click your project, select Properties then in the dialog change the Output type from Windows Application to Class Library.

    Regards - Nathan

  3. #3
    Woo! Hoo! my 1st post
    Join Date
    2003-03
    Location
    West Jordan, UT
    Posts
    1

    Default Re: VB.Net Netload DLL and Windows forms (EXE)

    According to Clayton Hotson and his class on .NET at AU, he said that when using forms you should be using the .ShowModalDialog() or .ShowModelessDialog() methods rather than .Show() which is not supported in Acad. Additional benefits of using the preferred methods include forms remembering sizing and positioning changes throughout the session.

    Ben Rand
    CAD Manager
    CEntry Constructors & Engineers
    brand@centry.net

Similar Threads

  1. Error on Netload (DLL on network)
    By EDDemtec in forum Dot Net API
    Replies: 2
    Last Post: 2011-09-22, 09:49 PM
  2. NETLOAD in AutoCAD 2012
    By LogoKevn in forum AutoCAD General
    Replies: 1
    Last Post: 2011-08-15, 06:54 PM
  3. Some Void Forms...
    By brent.130528 in forum Revit Architecture - General
    Replies: 1
    Last Post: 2010-01-26, 11:15 PM
  4. Netload command not recognized
    By michael.hooker in forum Dot Net API
    Replies: 0
    Last Post: 2008-12-04, 08:29 PM
  5. The Different Forms of 3d
    By mlawler in forum DV - The 3rd Dimension
    Replies: 3
    Last Post: 2005-12-12, 08:22 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
  •