Understanding Block Definitions and Block References (AutoCAD .net API)

_config.yml

What is a block? What is a block reference? And what is the difference?

Let’s use an analogy to help illustrate the concept.

Birth certificates are like your block table record, photocopies of your certificate are like block references.

(A) Block Definitions

Imagine you have a really important document like your GREEN card/birth certificate etc. you have to keep this document locked away in your solicitor’s office. This green card is exactly like a block table record. You only have one of this document. But let’s just say you want to have many copies of your green card.

(B) Block References

Are you going to recreate a green card (and have many originals) so you can give one to the IRS, another to the department of immigration, another to the department of homeland security etc etc? No! Of course not: you are not going to recreate it; you are simply going to make photocopies of it. It makes sense because photocopies are cheap and easy and don’t cost (much) memory.

The photocopies of your green card are like block references. you can have many photocopies of your green card, and you can paste them anywhere you want: on the street, in your home etc. you can even delete them. you can delete or destroy all of them, but you will still have your original green card located safely somewhere in your house, or your lawyers office (i.e. the block table record). If you destroy the original green card then guess what - you will no longer be able to make copies of it (i.e. you won’t be able to make any block references if you don’t have a block table record which it points to.)

Summary:

So you have the original birth certificate (block definition), and you’ve made a photo copy of your birth certificate (block reference).

Where is it all located?

The block definition is located in a place called the “block table”. Just because it is in the block table, doesn’t mean it will appear in your drawing. If you want to put it in your drawing then you need to create a block reference (which points to the block definition) and then you need to put the block reference into your drawing.

How to add lines etc to your drawing - what is the model space?

Imagine you are drawing on a piece of paper. if you want to have a line drawn on that paper, you have to add that line to the “model space”. The paper space is basically like some special 3d-glasses you wear to view all your drawings. Think of it like a camera lens, allowing you to see the same thing in many different shades/perspectives/views.

Geometry can be added to a block definition

Think of the block definition as a basket - it’s a basket you can add many things to. You can add, for example, lines, circles, text, all sorts of shapes into this basket. And when you are ready to draw, you can place photocopies of what’s in the basket, all over your drawing, perfectly replicating it.

Getting more technical

The “model space” is itself a block table record. And so is the paper space. When you want to add something to a drawing you will have to create a block reference and “append it” to either the model space or a paper space (or other layouts - but let’s not get into that).

I hope this explanation helps you.

Written on May 25, 2017