Jigs

  • A big thanks to Holger Seidel from CADsys for proposing this topic and providing the bulk of the code. My main contribution - aside from some minor edits - was to implement the logic in the "BJIG" command to allow selection of the block and then loop to multiply insert it. The jig definition is almost entirely Holger's. The below C# code essentially implements a streamlined "multiple insert" command, without the options to scale or rotate the block (this would be very simple to add, of course). The code was written for AutoCAD 2007-2008. The only change you should need…

  • This post extends the polyline-creation jig shown in the previous entry to support the use of keywords both for arc segments and for undo. A few notes: I removed the use of a separate vertex list, as it proved to be less necessary than needed This implementation supports Undo, and the toggling between Line segment and Arc segment entry Arc segments have a fixed bulge of 1.0, which is actually quite useful if drawing a cloud, but not really useful for much else. Generally the bulge should be adjusted according to the position of the cursor relative to the previous…

  • During the first two parts of this series we looked at different techniques for creating polylines programmatically in AutoCAD (while allowing the user to select the various vertices). In this post look at the most advanced technique yet, the use of a "Jig". A Jig is a special construct in AutoCAD that hosts an object - in our case a polyline - and feeds user input information into this object, which then determines what graphics gets displayed. This is especially useful when dealing with complex objects, such as polylines with arc segments. We're going to start with a fairly basic…