haplokuon / netDxf

.net dxf Reader-Writer
MIT License
995 stars 405 forks source link

How to get the attribute value of a block reference entity(Insert)? #281

Closed 865390841 closed 3 years ago

865390841 commented 3 years ago
Hello,This is a nice library to handle dxf file。
And now i try to get the attribute value of a block reference entity that draw in AutoCAD 2016,but  got the empty string instead of the expected attribute value.
Part of my code is as follows:
        var attributes = block.AttributeDefinitions;
        var attValues = attributes.Values;
        var lableStr = "UnInit";
        if (attValues.Count != 0)
        {
            lableStr = attValues.ElementAt(0).Value;
        }
This is whether I use the right properties and classes,Thank you for your help。
haplokuon commented 3 years ago

Read this specially my last post.