How to Draw With .NET in AutoCAD

Written by ehow computers editor
  • Share
  • Tweet
  • Share
  • Email

Programming in VB.NET to execute your AutoCAD applications is a complicated process. You must become familiar with Microsoft's Visual Basic, AutoCAD's ObjectARX and AutoCAD itself as well. Here is how to program in VB.NET in the AutoCAD platform so you can execute drawings with ObjectARX in AutoCAD.

Skill level:
Challenging

Other People Are Reading

Things you need

  • AutoCAD
  • Computer with at least 2 GB RAM
  • Visual Basic

Show MoreHide

Instructions

  1. 1

    Read AutoCAD's "managed wrapper classes" chapter in the help section of the ObjectARX. This gives you a basic understanding of how to execute code in VB.NET.

  2. 2

    Take the tutorial "DevTV: Introduction to AutoCAD .NET Programming," available at the Autodesk website.

  3. 3

    Close AutoCAD. If you try to run both Visual Basic (VB) and AutoCAD at the same time, your computer may run out of RAM, especially since AutoCAD can take up to 50 MB just by itself. Close out of AutoCAD and dump your cache, restart your computer or both.

  4. 4

    Open up VB. Get familiar with VB code. Some examples of VB.NET code for AutoCAD applications are "A.ActiveDocument.SaveAs(f.Text)", which allows you to save the AutoCAD DWG as a new file, "b.AddBox(New Double(2) {20, 20, 20}, 200, 200, 1)", which adds a box with (20, 20, 20) as its center, and "A.Documents.Open("d:\test\test.dwg")" then "Dim d As AutoCAD.Interop.AcadDocumentClass = A.ActiveDocument", which makes a new AutoCAD.Interop.AcadApplication.

  5. 5

    Buy "VB.NET Programming for AutoCAD Customization." This is a detailed manual for VB.NET programming for AutoCAD and should give you everything you need to get started. It is available at Amazon.

Don't Miss

Filter:
  • All types
  • Articles
  • Slideshows
  • Videos
Sort:
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the eHow.co.uk site, you consent to the use of cookies. For more information, please see our Cookie policy.