Blocks
-
In the last post we saw some code to perform simple sequential numbering of blocks (reflected in a particular attribute contained in each block). In this next installment we'll extend the code by introducing a NumberedObjectManager class, which will manage the activities related to maintaining the sequence of numbers used by the various blocks. The […]
-
I had this interesting request come in by email: I have a problem where I have a block I need to insert into several parts of a drawing. The block has three attributes, 1. Point number, 2. Level, and 3. Code. I would like to do the following; 1. be able to select objects in […]
-
This post finally takes the code last shown in this previous post, migrating it to use RealDWG to update a folder of DWGs without the need for AutoCAD to be installed on the system. A big thanks to Adam Nagy, a member of DevTech working from our Prague office, who turned around my request to […]
-
In the last post we looked at some code to search the current drawing for a particular attribute and update its value. In this post - as promised - we're going to look at how to extend this application to work on a folder of drawings, updating those that contain the attribute and saving them […]
-
This suggestion came up in reference to this previous post about using side databases. The request is to be able to open a number of DWG files and modify a particular attribute, saving the files back. Rather than jumping in and solving both problems in one post, we'll start today with the problem of updating […]
-
In the last post we looked at some code to create a table of attribute values for a particular block. In this post we'll extend that code and show how to use a formula to create a total of those values. Below is the C# code. I've numbered the lines, and those in red are […]
-
This post was inspired by suggestions from a few different people (you know who you are! :-). I'm going to take it in two parts: this post will focus on creating a table automatically that lists the values of attribute references included in block references in the modelspace that point to a particular block table […]
-
It's been a hectic week, between one thing and another, and I don't expect it to get better anytime soon: apart from anything else, my wife is due to give birth any day to our second child. We're both excited - and admittedly a little anxious - about it, and our 2 year-old seems to […]
-
I didn't spend as much time as would have liked talking about the code in the previous topic (it was getting late on Friday night when I posted it). Here is a breakdown of the important function calls. The first major thing we do in the code is to declare and instantiate a new Database […]
-
We're going to use a "side database" - a drawing that is loaded in memory, but not into the AutoCAD editor - to import the blocks from another drawing into the one active in the editor. Here's some C# code. The inline comments describe what is being done along the way. Incidentally, the code could […]