.NET
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Block and it’s reference (block to reference pointer)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I have a block: “Block_A”. I am trying to determine if a block reference of the block exist.
Currently I would iterate every block Reference in the Block Table, and then dig deep into each block ref . . . . .
I was wondering if I could just take “Block_A” and see if it has reference and where the references are. Perhaps this is just wishful thinking but I was hoping for a faster way to obtain the references then to iterate thousands of blocks in each table record.
Thank you,
-Jay
Re: Block and it’s reference (block to reference pointer)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
So you want to find all the BlockReferences associated with a particular BlockTableRecord? If so, BlockTableRecord.GetBlockReferenceIds() is the function you're looking for.
Stephen Preston
Autodesk Developer Network
Re: Block and it’s reference (block to reference pointer)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thank you Stephen.
Re: Block and it’s reference (block to reference pointer)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Stephen!
It is true only for "non-dynamic" block's. Other words if blockreference of dynamic block was modified then its ObjectID was not returned with BlockTableRecord.GetBlockReferenceIds().
It is possible get all ObjectID of anonymous BlockTableRecord's which corresponds to main BlockTableRecord with help of method BlockTableRecord.GetAnonymousBlockIds(), and then for each anonymous BlockTableRecord method BlockTableRecord.GetBlockReferenceIds() return all BlockReference: http://forums.autodesk.com/t5/NET/Keeping-track-of
Re: Block and it’s reference (block to reference pointer)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thank you Alexander that's very good to know too. Spasibo.




