A block defined once with its own entities and attribute definitions, then placed twice, once scaled and turned, by inserts that give its attributes their values.
Edit::AddBlock makes an empty block, with its block record where the drawing has block records. Entities added under the block’s name go into it, in the block’s own coordinates: an insert puts the block’s base point, Begin.Origin, at its own position.
An ATTDEF names an attribute by its Tag, with the Prompt shown when the block is inserted and a default value in Lettering->Value: an ATTDEF keeps its Lettering on the heap, reached with ->. Horizontal 1 and Vertical 2 center the number on Alignment, the base point here, and Flags 1 makes the size invisible.
Bit 2 of Begin.Flags says the block has attribute definitions that are not constant. AddBlock leaves the flags at 0, so set it once the block has its ATTDEFs.
C++
if (DxfIO::Blocks::Block *valve = DxfIO::Edit::FindBlock(drawing, "Valve")){ valve->Begin.Flags = 2;}
An insert gives each attribute its value in an ATTRIB of the same tag and flags. The insert does not move an ATTRIB: it is drawn where its own Lettering says, so give it the definition’s text as the insert places it. For these two definitions, both at the base point, that is the insert’s position, with the height scaled and the rotation turned.
The ATTRIBs follow their INSERT in the file, up to a SEQEND. Edit::Add sets the insert’s Follows, group 66, which says they are there, gives it its SEQEND, and gives the ATTRIBs and the SEQEND handles of their own.