What exactly does the block table record in model space contain?

What exactly does the block table record in model space contain?

swaywood
Collaborator Collaborator
567 Views
1 Reply
Message 1 of 2

What exactly does the block table record in model space contain?

swaywood
Collaborator
Collaborator

Hello,

What exactly does the block table record in model space contain?
What else is there besides entity? How to judge its type?
Is there any article on this?

 

using (var tr = dbNow.TransactionManager.StartTransaction())
{
BlockTable bt = tr.GetObject(dbNow.BlockTableId, OpenMode.ForRead) as BlockTable;
BlockTableRecord btrSpace = tr.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForRead) as BlockTableRecord;

foreach (ObjectId id in btrSpace)
{
		Entity ent = null;

		try
		{
			ent = tr.GetObject(id, OpenMode.ForRead) as Entity;
		}
		catch
		{
			continue;
		}
}

 

0 Likes
568 Views
1 Reply
Reply (1)
Message 2 of 2

_gile
Consultant
Consultant

Hi,

Like all other BlockTabeRecord instances, the ModelSpace is a container for Entity instances and it only contains entities. Beside that, like the ¨paper space BlockTabeRecord instances it has a link to a Layout object which is mainly a plot configuration.



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes