Message 1 of 15
Getting Constant Attributes from a Block with C#
Not applicable
06-05-2009
09:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to get all of the attributes off of a given block entity.
I use the code below to pull off the array of attributes and it works fine.
//Create a reference to the block and open it for reading
BlockReference myBR = (BlockReference)tm.GetObject(aID, OpenMode.ForRead);
//Get the attributes off of the block reference
Autodesk.AutoCAD.DatabaseServices.AttributeCollection blockAttrs = myBR.AttributeCollection;
How do I get the hidden attributes off of the same block?
In the VBA version of this progam I used: varAttributes = blkRef.GetConstantAttributes
I cannot find the corresponding method to do this in C#.
I use the code below to pull off the array of attributes and it works fine.
//Create a reference to the block and open it for reading
BlockReference myBR = (BlockReference)tm.GetObject(aID, OpenMode.ForRead);
//Get the attributes off of the block reference
Autodesk.AutoCAD.DatabaseServices.AttributeCollection blockAttrs = myBR.AttributeCollection;
How do I get the hidden attributes off of the same block?
In the VBA version of this progam I used: varAttributes = blkRef.GetConstantAttributes
I cannot find the corresponding method to do this in C#.