I can't see your picture because it's too small. And is your drawing correct in archicad?
And since it says D2, it seems to specify it as an Element ID. And that's usually expressed in marks. Select the door and press Ctrl+T to enter the settings and you will see which marker you used. You might want to look at it and study it.
The label you are referring to is part of the dimension marker that is part of the door and window tools. There are variations available within the door and window tools. These are not available as label types under the label tool but there are other variations available there. The Dimension Marker that is part of the window and door tools has been a feature for many years that pre-dates the newer more advanced label tool.
Lee Hankins ArchiCAD 4.5 - Archicad 27UKI Apple Silicon 5003 macOS Ventura (13.5.2)