I’m trying to extract the block attributes. I can open the drawing and get the block and attribute definitions :
CadImage cadImage = (CadImage) Image.load(dataDir + “A01.00-00-10.00.DWG”);
CadBlockEntity stempel = cadImage.getBlockEntities().get_Item(“StempelAUMC”);
for ( Enumerator<String, CadAttDef> it = stempel.getAttDefs().iterator(); it.hasNext(); ) {
KeyValuePair<String, CadAttDef> pair = it.next();
System.err.println(pair.getKey() + ": " + pair.getValue().getDefaultString() );
}
This is giving me the list of attribute definitions I need, but how can I get the actual attribute values of the block?