Thanks to Philippe Leefsma, from DevTech in Europe, for the ObjectARX code that inspired this post. In AutoCAD it’s possible to create non-rectangular viewports in paperspace using a variety of closed curve objects: circles, polylines (2D, 3D and lightweight), ellipses, regions, splines and faces. In this post we’re going to see some code that creates four new viewports in the paperspace of the active drawing using a subset of these objects: an Ellipse, a Circle, a closed Spline and a closed Polyline. Here’s the C# code: using Autodesk.AutoCAD.ApplicationServices; using Autodesk.AutoCAD.Runtime; using Autodesk.AutoCAD.DatabaseServices; using Autodesk.AutoCAD.EditorInput; using Autodesk.AutoCAD.Geometry; namespace ViewportCreation {...
Read more →