From the course: AutoCAD: Building Add-ins with C#

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Create a line

Create a line - AutoCAD Tutorial

From the course: AutoCAD: Building Add-ins with C#

Start my 1-month free trial

Create a line

- [Instructor] In this video, we're going to finish up talking about the database services name space by creating a new align object in our drawing. To create a new line, we're also going to be introduced to a different name space that's not covered in this course thoroughly, but a very powerful name space in the AutoCAD API, called the geometry name space. Let's go ahead and get into our exercise. I'm going to open up from our desktop, exercise files, and choose chapter five and the 05-05 solution. When we do so, if the initialization class isn't open already, we can come to the solution explorer and open it up, and of course, expand the region commands, and there's a command already there started for us called LICreateLine. We have the current drawings database, and within that database we've already started a transaction. We have a nice tri-catch statement to trap the error, and our transaction commits any changes down here. So let's go ahead and get the object we're gonna draw the…

Contents