AutoCAD
-
We started this series by looking at how to get the centroid of a region, and then how to create text that fits an arbitrary space. In this post we're going to wrap up by looking at the original question of how to resize block attributes to fit their container. The core algorithm is actually […]
-
After the last post, where we saw how to get the centroid of a Region, today we're going to use that information to place some text inside a detected space. To restate our process from last time: The user selects a point Call Editor.TraceBoundary() to determine the containing space Call Region.CreateFromCurves() with the resulting geometry […]
-
This week we're going to look at an interesting problem: how to create text that fits into a particular space. The scenario was originally presented (to me, anyway) by Alex Fielder, early last year (thanks, Alex!), but it's taken a while for me to get to it. Alex wanted to check for the extents of […]
-
In the last post we introduced a static C# class containing extension methods for the ObjectId and Transaction classes. The new Transaction methods allow you to more easily "lock" objects, whether because they're "system" objects you want to keep around in every drawing or because they're objects that shouldn't be purged at whim by users. […]
-
This is one of those topics that has been at the back of my mind for a number of years. Here's a question I received via a blog comment back in 2009: I was wondering if there's an easy way to modify the objects to purge. For example, if a particular text style was included […]
-
This question came in as a blog comment on this previous post: Is possible to use Revision Cloud in this situation? Example: Creating a polyline/circle/ellipse then make it a revision cloud. It seemed to make sense to broaden the topic for the purposes of this blog post: how to pass an entity or entities to […]
-
This interesting question came in by email from Igor, over the weekend: Let say I want to delete a layer by it's name. I can get ObjectId or LayerTabelRecord from the name, like LayerTable tLayers = (LayerTable) Transaction.GetObject(Database.LayerTableId,OpenMode.ForRead,false) LayerTableRecord ltRecord = (LayerTableRecord) Transaction.GetObject(tLayers.Item[Name],OpenMode.ForWrite,false); Now having LayerTableRecord how can I found out that this DBObject is […]
-
As mentioned in this recent post, I've been working on my AutoCAD I/O-driven web-site on and off for the last few weeks. Lately I've had to think beyond certain assumptions I'd made about its architecture, and I thought it worth sharing those thoughts here. The intention of the site is that you upload an image […]
-
Here's an interesting question that came in from Nick Gilbert via a blog comment: Is there a simple way to get the geometric extents of the group? As discussed in this previous post, the Group object in AutoCAD presents itself as a collection of geometric objects (or entities, in ObjectARX-parlance). But a Group, in itself, […]
-
Today's post resulted from an internal discussion: Miroslav Schonauer – with the help of Jan Liska – put together some code for a recent consulting engagement that they felt was important to share with the community. They wanted to test point containment for a particular 3D solid, but also to test whether the selected point […]