The problem with Block reference

Hello,

There is a problem with the Aspose.CAD API for Java. For some reason, for some block references, the definition of the insertion point gives the wrong result. For example, in the attached files (there is only one object for simplicity), you can see that the insertion point of the object is: -1018.948; 1307.664. But Aspose API returns - 1018.948; 1307.664 (1018.948 instead of -1018.948). I tried to show all the necessary information in the attached screenshots.

Thanks in advance!
Screenshot 2021-07-14 101525.png (22.2 KB)
Screenshot 2021-07-14 103146.png (38.2 KB)
bug_sample.zip (807.7 KB)

@hliakau

Can you please share the used sample code along with version information on your end.

@mudassir.fayyaz

the library version is 20.6

public List<CadSAPElement> extractElements(final CadImage cadImage, final String dataLayer) {
    CadBaseEntity[] cadBaseEntities = cadImage.getEntities();
    final List<CadBaseEntity> elements = new ArrayList<>();
    for (CadBaseEntity entity : cadBaseEntities) {
        if (isInDataLayer(entity, dataLayer)) {
            if (entity instanceof CadInsertObject) {
                elements.add(entity); // if I try to get the insertion point of the entity here ((CadInsertObject) entity).getInsertionPoint()) I will get the wrong result
            } 
        }
    }
}

@hliakau

We need to further investigate this on our end. A ticket with ID CADJAVA-10222 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

I have no problem with making own Block ID´s and reference them. But when I try to reference an ID at the end of a bullet list, it seems to reference all the above text as the block, but if I reference to them heading at the top of the list - no problem.

Why and how do I correct that?

I am by no mens a tech geek, so please keep it low profile

Thx Søren

@priti8835

Can you please share the details of issue incurring in the form of source example code, source file and generated output so that we may investigate that on our end.

The issues you have found earlier (filed as CADJAVA-10222) have been fixed in this Aspose.CAD for Java 22.1 update. This message was posted using Bugs notification tool by Oleksii.Gorokhovatskyi