now i can get the anonymous blockname like 'uxxx', but i want to know the original block name before the insert changed to an anonymous block.
ps,the block is not a dynamic block.
Solved! Go to Solution.
Solved by _gile. Go to Solution.
You can use BlockReference.DynamicBlockTableRecord to open the BlockTableRecord and get its name property but if it is not dynamic not sure how that will help.
Hi,
This has been asked before, something like this should help:
Public Shared Function GetEffectiveName(ByVal blkref As BlockReference, ByVal acTrans As Transaction) As String Dim btr As BlockTableRecord btr = acTrans.GetObject(blkref.DynamicBlockTableRecord, OpenMode.ForRead) Return btr.Name End Function
Gaston Nunez
Hi,
I think you should take a look to the developer documentation, this link will help you to understand the object hierarchy in AutoCAD: Hierarchy
May be I'm wrong, but I think you can't create create a dynamic block definition with .NET API. Another thing is a block reference, and there is no problem creating one and driving its parameters with the .NET API.
Gaston Nunez
i attached the dwg file
the block name contains "ISO A1"
and the block description contains "ISO A1" too
i just want to get the blockreforence which contains 'ISO A1" , by block name or by block descrption.
hi,gile
I solved my problem,thank you.
but how can you know the 'comments' property is the same with block description, is there any dictionary descripe this?
i want to know the skill, then i can solve some other problem by myself.