Hello @mudassir.fayyaz
I have different (multiple) images in one dxf file.
Based on the image file name, I need to set the scale of the image as per the ratio of the dxf image width to actual image width.
In the attached dxf file i have 2 image.
- client.jpg
- billOfMaterial.jpg
now i want to set scale based on image name
CadImage cadImage = (CadImage) image;
for (CadBaseEntity entity : cadImage.getEntities()) {
if (entity.getTypeName() == CadEntityTypeName.IMAGE) {
CadRasterImage entity2 = (CadRasterImage) entity;
if (entity2.getImageName().equals("Client.jpg")) {
entity2.getUVector().setX(entity2.getUVector().getX() * 2);
entity2.getVVector().setY(entity2.getVVector().getY() * 2);
} else {
entity2.getUVector().setX(entity2.getUVector().getX() * 5);
entity2.getVVector().setY(entity2.getVVector().getY() * 5);
}
}
}
How can i get image name or image reference name something like entity2.getImageName().equals(“Client.jpg”)
multiple images.png (145.9 KB)
billOfMaterial.jpg (6.3 KB)
client.jpg (26.0 KB)
multiple images.zip (80.1 KB)