.NET

Reply
Distinguished Contributor
VB_Autocad_guy
Posts: 136
Registered: ‎07-24-2009
Message 1 of 4 (312 Views)
Accepted Solution

BlockTableRecord vs DynamicBlockTableRecord

312 Views, 3 Replies
03-20-2012 02:32 PM
   For Each myEntID As ObjectId In myBTR
                        Dim myEnt As Entity = myEntID.GetObject(OpenMode.ForRead) 'Read Entity

                        If TypeOf myEnt Is BlockReference Then
                            'If Block Reference
                            Dim myBRef As BlockReference = CType(myEnt, BlockReference)
                            Dim myBlockDef As BlockTableRecord =  myBRef.BlockTableRecord.GetObject(OpenMode.ForRead)
                            'myBRef.DynamicBlockTableRecord.GetObject(OpenMode.ForRead)
                    

 

What's the differencebetween blocktablerecord and dynamicblocktablerecord? 

When I'm trying to access the blocktablerecord what's the difference?

 

Will blocktablerecord work on dynamic blocks are they somewhat interchangeable?

HI there,

 

BlockTableRecord is the actual block record that is being used (i.e. shown) by the block reference.

The DynamicBlockTableRecord is the block (if the block reference is referencing a dynamic block) that the BlockTableRecord instance is based on (it's a specific variation of the dynamic block)

 

If you are already familiar with the concept of dynamic blocks from a user interface point of view, then the best thing, as always :smileyhappy:, is to use a utility like ArxDbg/MgdDbg and look into the database and see for yourself the relation between the various objects.

 

I hope this helps. 

 

Cheers,

Adam Nagy

Autodesk Developer Network

ADN Support Specialist
adam.nagy
Posts: 610
Registered: ‎03-26-2007
Message 2 of 4 (292 Views)

Re: BlockTableRecord vs DynamicBlockTableRecord

03-20-2012 06:16 PM in reply to: VB_Autocad_guy

HI there,

 

BlockTableRecord is the actual block record that is being used (i.e. shown) by the block reference.

The DynamicBlockTableRecord is the block (if the block reference is referencing a dynamic block) that the BlockTableRecord instance is based on (it's a specific variation of the dynamic block)

 

If you are already familiar with the concept of dynamic blocks from a user interface point of view, then the best thing, as always :smileyhappy:, is to use a utility like ArxDbg/MgdDbg and look into the database and see for yourself the relation between the various objects.

 

I hope this helps. 

 

Cheers,

Adam Nagy

Autodesk Developer Network



Adam Nagy
Developer Technical Services
Autodesk Developer Network
Distinguished Contributor
VB_Autocad_guy
Posts: 136
Registered: ‎07-24-2009
Message 3 of 4 (284 Views)

Re: BlockTableRecord vs DynamicBlockTableRecord

03-20-2012 08:14 PM in reply to: VB_Autocad_guy
Yah thanks that does help. I'm familiar with arxdbg. I'll fiddle around with it. I believe our site doesn't use many dynamic block.

What's the property or method to see if a block record is dynamic?
ADN Support Specialist
adam.nagy
Posts: 610
Registered: ‎03-26-2007
Message 4 of 4 (268 Views)

Re: BlockTableRecord vs DynamicBlockTableRecord

03-21-2012 01:44 AM in reply to: VB_Autocad_guy

Both BlockTableRecord and BlockReference classes have an IsDynamicBlock property that can be used to tell if the object is (or is referencing) a dynamic block.

 

Cheers,

Adam 



Adam Nagy
Developer Technical Services
Autodesk Developer Network
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!