Dimensions

  • I thought it would be interesting to spend a few posts looking into the multileader or MLeader functionality in AutoCAD 2008. To get things started, here's some simple code that prompts the user for a couple of points and then creates a single spline-segment multileader with multi-line text at the points specified. It also uses the technique shown in this previous post to specify a custom arrow-head. Here's the C# code: using Autodesk.AutoCAD.Runtime; using Autodesk.AutoCAD.ApplicationServices; using Autodesk.AutoCAD.DatabaseServices; using Autodesk.AutoCAD.EditorInput; using Autodesk.AutoCAD.Geometry; namespace DimensionLibrary {   public class DimensionCommands   {     static ObjectId GetArrowObjectId(string newArrName)     {  …

  • Most of this week I've spent catching up after a nice, long break, as well as spending a few days in Prague helping interview potential recruits for our European team. Now it's finally time for me to climb back into the blogging saddle... This first entry of 2007 is based on some code provided by Viru Aithal, a member of our team based in Bangalore. The code demonstrates how to create a leader using an arrowhead other than the current default (the one referred to by the DIMBLK system variable). Here's the C# code: using Autodesk.AutoCAD.Runtime; using Autodesk.AutoCAD.ApplicationServices; using Autodesk.AutoCAD.DatabaseServices;…

  • This is an interesting little problem that came in from Japan last week. Basically the issue is understanding how to call the DIMARC command programmatically from LISP using (command). The DIMARC command was introduced in AutoCAD 2006 to dimension the length of arcs or polyline arc segments. What's interesting about this problem is that it highlights different aspects of entity selection in LISP. Firstly, let's take a look at the DIMARC command (I've put the keyboard-entered text in red below): Command: DIMARC Select arc or polyline arc segment: Specify arc length dimension location, or [Mtext/Text/Angle/Partial/Leader]: Dimension text = 10.6887 The…