.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How can I obtain an entity from a wblocked dwg?

1 REPLY 1
Reply
Message 1 of 2
Anonymous
259 Views, 1 Reply

How can I obtain an entity from a wblocked dwg?

Hello,

If I've wblocked to a file, how can I obtain an entity in C# that represents the block?

Say I wanted to add it to a drawing, I would do this:

BlockTableRecord newBtr = new BlockTableRecord();
newBtr.Name = "MyBlock";
newBtrId = bt.Add(newBtr);
trans.AddNewlyCreatedDBObject(newBtr, true);
newBtr.AppendEntity(***theEntity***);
trans.AddNewlyCreatedDBObject(***theEntity***, true);

What can I fill in the blank with?

Thanks very much for your help. I'm really lost with this stuff.

-Carlos
1 REPLY 1
Message 2 of 2
namrata.nekkanti
in reply to: Anonymous

i think you should be using a block ref object for retrieving the Wblock

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost