We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Reading "actual" block name from anonymous block

Hello I’m reading a list of blocks from a .dwg file in a .NET application, and I noticed some of the blocks that I get from CadImage.Entities, are read as anonymous blocks so the value of their BlockName property is always in the format “*U…” which is not the name I see in Autocad.

How can I get the “actual” block name that I see in Autocad for this kind of blocks?

I’m dding some informations and a little example file.

The code I’m using is something like:

CadImage cadImage = (CadImage)Image.Load(filePath)
using (cadImage)
var entities = cadImage.Entities.Where(x => x is CadInsertObject);

Using the example file, entities variable will contain 2 blocks, one with the correct BlockName and another one with BlockName="*U…". How can i get the real name of the second block?
example.zip (13.6 KB)


Can you please share the requirements in the form of snapshot that what actually is missing on your end that you want to access using API?


Thanks for you answer, can you specify what I need to provide you exactly?


I mean explanation and perhaps a snapshot for explanation of this please.

@mudassir.fayyaz in the zip file i attached to the post you can find a .dwg to use as example.
If you open the .dwg with autodesk, you will see 2 blocks that look IDENTICAL, called “NG”.

If you extract the blocks from the .dwg as CadInsertObjects using my code above, you will see that one has CadInsertObject.Name=“NG” (correct) and the other has CadInsertObject.Name="*U3" (WRONG!).

I expected CadInsertObject.Name=“NG” for BOTH blocks.

Inside cadImage object, is there a property where i can find the “real” name (“NG”) of the second block instead of “*U3”?