Skip to content

This project takes a text legal description as input and plots it into AutoCAD for you.

License

Notifications You must be signed in to change notification settings

rilstrats/legal-plotter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Legal Plotter

Overview

In the legal, surveying, and civil engineering fields, real estate properties are described by specifying the length, bearing, and radius of lines and arcs of the outer property line. When you start working on a project, the first thing you often do is take these legal descriptions and plot them into a CAD software. It can be quite tedious to do this by hand, and I knew there had to be a better way to do this.

This was my inspiration for making legal Plotter! This project takes a text legal description as input and plots it into AutoCAD for you. This was initially made in Python using a macro, but it is now a full fledged plugin for AutoCAD built in C#.

Check out this video to see it in action!

Installation

  • Download Legal Plotter
  • Open AutoCAD 2022
  • Type NETLOAD and press enter
  • Select LegalPlotter.dll from where you downloaded it
    • Default location is Downloads/LegalPlotter.dll
  • Type LEGALPLOTTER and press enter
  • Fill out the form, press submit, and watch the magic happen

Development

Local Environment

  • Clone this repository
  • Open the project in Visual Studio
  • Select acad.exe as the startup object
    • Default location is C:\Program Files\Autodesk\AutoCAD 2022\acad.exe
    • Optional: Use the /nologo command line argument for a faster startup.
  • Install ObjectArx 2022
  • Add AcCoreMgd.dll, AcDbMgd.dll, and AcMgd.dll as references
    • Default location is C:\Autodesk\ObjectARX_for_AutoCAD_2022_Win_64bit_dlm\inc\
    • Set Copy Local to False for the three references you added

Local Testing

  • Press start in Visual Studio to compile and start AutoCAD
  • Once AutoCAD is open, type NETLOAD and press enter
  • Select LegalPlotter.dll
    • Default location is Repository/LegalPlotter/Debug/LegalPlotter.dll
  • Type LEGALPLOTTER and press enter
  • Fill out the form, press submit, and watch the magic happen

Classes

  • Legal: This is the meat of this project. It calls on the LegalForm class to open a form for user input. Once that it is submitted it parses the string, calls the Calculate class to calculate what the legal description should look like, then calls on the Active class to draw the legal description.
  • LegalForm: Opens a form that accepts the parcel name and legal description as input.
  • Calculate: Computes all necessary information to turn a string into data ready to go into AutoCAD. Determines the quadrant; converts degrees, minutes, and seconds to radians; determines x and y deltas; and returns the verticies of lines to be drawn.
  • Active: This is a static helper class. It instantiates three lambda variables that are called repeatedly, being the active Document, Database, and Editor. It is drawing lines, curves, and text in AutoCAD.

Development Environment

  • Visual Studio Community 2022 (IDE): An IDE with strong support for C# and referencing external files in your project.
  • .NET 4.8 Framework (C#): The .NET framework currently supported by AutoCAD.
  • AutoCAD 2022: Student trial of AutoCAD to test the development of plugins.
  • ObjectARX SDK: A software development kit that assists in developing plugins for AutoCAD.

Useful Websites

Future Work

  • Implement code for being able to draw curves (tangent, non-tangent, and reverse)
  • Draw individual lines and curves, then join them all together (using layer as criteria for join)
  • Make regular expressions more robust, working in more situations
  • Implement error correction for text legal descriptions (replacing an incorrect letter "O" with the number "0")
  • Remove pre-filled information from the form
  • Edit the form to make it look and behave better (user can't resize, add minimize button, etc.)

About

This project takes a text legal description as input and plots it into AutoCAD for you.

Topics

Resources

License

Stars

Watchers

Forks

Languages