DXF not reading all entities

Hello,
I have different DWG files with 5 layers, all layers are showed correctly using:

   cadImage.getLayouts().values().forEach(layout -> {
        System.out.println(layout.getLayoutName());
        System.out.println("Layout Value: " + layout);
    });

Output:
Layer Value: 0
Layer Value: 1
Layer Value: 3
Layer Value: 5
Layer Value: 8

But when I read the entities:
for (final CadEntityBase entity : cadImage.getEntities()) {
System.out.println(“entity got:” + entity.getTypeName() + " layer:" + entity.getLayerName());
}

Here I don’t see all entities in relation with the layers, I don’t have a clue why.

Any idea? (It happens with some dwg files but not all of them)

Using aspose 24.3 (is recent, not the most) as 24.6 is latest but got some compatibilty errors with my Java 11 installation.

Hi.
This could happen because the access to Entities collection is limited with 100 entities only without any license applied.

You can get free evaluation license in Purchase Portal. Please add the required products to the cart, view it, click “Proceed” and “Get a Temporary License” next.

Here is the example how to apply license:

License license = new License();
license.setLicense("Aspose.CADforJava.lic");