Issue reading some tags and attributes from DWG

Hi all,

I’m currently investigating the Aspose.CAD library and everything seems exactly as we need except for a detail that I can’t seem to figure out how to correct myself.
Basically, the requirement is that we need to read a .dwg file, loop over all the symbols, and read its attributes + values.
For the majority of tags and attributes, this is fine, but I noticed there are some differences to the data we can read through the API and what we see in AutoCAD/RxView.

For example, the following symbol:

symbol.jpg (33.5 KB)

When I read this with the following unittest:

[TestMethod]
public void test_aspose_cad()
{

using (var image = Aspose.CAD.Image.Load(@"C:\PRJ\Symboles-Only1.dwg") as Aspose.CAD.FileFormats.Cad.CadImage)
{
    var inserts = image.Entities.OfType<CadInsertObject>().ToList();
    var block = inserts.Single(x => x.ObjectHandle == "24D04");
    foreach (var childObject in block.ChildObjects.OfType<CadAttrib>().OrderBy(x=>x.AttributeString.Value))
    {
        Console.WriteLine("{0}: {1}", childObject.AttributeString.Value, childObject.DefaultText);
    }
}

}

I get the following output:

EQ_NAME: 726
EQ_SUB_NAME: SLOT C
I/O_CONN_01_FUNCTION: 5-
I/O_CONN_01_NAME: 3
I/O_CONN_02_FUNCTION: 013/1
I/O_CONN_02_NAME: 2
I/O_DESCR_001: SR1 EN
I/O_NAME: I2

Notice the tag for the I/O_DESCR attribute is suffixed with _001 - I don’t know where this comes from, and I’m not able to find the string “I/O_DESCR” as I see it in the properties inside RxView anywhere.

I can provide the .dwg file used for this test if needed of course!

@hoogerspeter,

I have observed the information shared by you and request you to please provide a working sample project along with source DWG file with us. I will investigate the issue further on my end on provision of requested information.

PRJ.zip (249.8 KB)

The DWG file is in attachment

I didn’t bother creating a project; the following code block copypasted into a unittest illustrates the issue:

using (var image = Aspose.CAD.Image.Load(@“C:\PRJ\Symboles-Only1.dwg”) as Aspose.CAD.FileFormats.Cad.CadImage)
{
var inserts = image.Entities.OfType().ToList();
var block = inserts.Single(x => x.ObjectHandle == “24D04”);
foreach (var childObject in block.ChildObjects.OfType().OrderBy(x=>x.AttributeString.Value))
{
Console.WriteLine("{0}: {1}", childObject.AttributeString.Value, childObject.DefaultText);
}
}

@hoogerspeter,

I have observed the information shared by you. We need to investigate this issue on our end and an issue with ID CADNET-577 has been added as investigation to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be fixed.

I see in the issues status that it is marked as “Closed” - do you have any feedback if the behavior will be adjusted?

@hoogerspeter,

We have investigated the issue on our end. I Actually, attribute I/O_DESCR has tag’s name I/O_DESCR_001. Unfortunately, Autocad system sometimes add postfix _001 in tag’s name. You can see it in attribute “24D04” for dxf format (Symboles-only1.dxf in attach). This problem has also been discussed on following Autocad’s forum as well:

Symboles-only1.dxf.zip (175.0 KB)