tags:

views:

27

answers:

1

How can I loop through the AttributeReferences for a BlockReference and create an exact copy (looks the same to AutoCAD user) of the AttributeReference as a DBText entity. I've seen the code to do this in AutoLisp from the express tools burst.lsp, but I haven't been able to figure out how to translate it to .Net. Here is the simple code for looping through the Attribute References

    foreach (ObjectId attributeReferenceId in blockReference.AttributeCollection)
    {
      AttributeReference attributeReference = (AttributeReference)transaction.GetObject(attributeReferenceId, OpenMode.ForWrite);
      // Make DBText copy
    }
A: 

The AttributeReference object supports both the Clone and the DeepClone functions. Have you tried any of them?

WizzardsApprentice
Calling those functions will just create a new AttributeReference. I need a DBText object.
Matthew Brown
I see. I overlooked the DBText requirement. Sorry for that.
WizzardsApprentice