Creating ATTRIB / ATTDEF programmatically using Aspose.CAD for Java

Hello,

I am currently evaluating Aspose.CAD for Java and I have a technical question regarding working with attributes in DWG/DXF files.

My use case is to generate CAD files programmatically and include attributes such as “OP” and “Quantity”, so they can be recognized by downstream CAD/CAM systems (e.g., nesting software).

So far, I was able to:

  • Load DWG/DXF files
  • Read existing attributes (ATTRIB entities inside INSERT)
  • Modify attribute values successfully

However, I could not find clear documentation or examples on how to:

  1. Create attribute definitions (ATTDEF) inside a block (BLOCK)
  2. Create attributes (ATTRIB) programmatically
  3. Associate these attributes correctly with an INSERT entity

My questions are:

  • Is it fully supported to create ATTRIB/ATTDEF entities from scratch using Aspose.CAD for Java?
  • If yes, could you provide a sample or recommended approach?

Any guidance or examples would be greatly appreciated.

Thank you.

@rhodolfo.novochadlo,
Hi,
we don’t have ready example for this, we have created CADJAVA-12092 to test this case.