Is DXF a programming language? In my opinion, yes. It is a set of text instructions that allow us to define vector graphic objects, to be opened, edited and reused with CAD software (LibreCAD, AutoCAD, Microstation, zwcad, etc.). If we know how to write DXFs, we can create libraries (for any programming language) to produce CAD drawings.
A minimal DXF file (program) consists of three parts:
0 SECTION 2 ENTITIES 0
A line entity between point (x1,y1) and (x2,y2). In this case between (0.1,0.3) and (2.3,-3.9)
LINE 8 layer_name > layer name 6 CONTINUOUS > line type 10 0.1 > x coordinate of first point 20 0.3 > y coordinate of first point 11 2.3 > x coordinate of second point 21 -3.9 > y coordinate of second point 39 0 62 1 > line color, 1=red 0
ENDSEC 0 EOF
Now we put everything together into a single text file line.txt, change its extension to dxf and we have it line.dxf. We can open it and continue editing, for example with AutoCAD, Microstation, or LibreCAD. This example is very simple, but it is essential to understand how to build DXF files. In this case we have only added a 2D line entity, but a 3D line entity is simply created by adding codes 30 and 31 for the z coordinates of the first and second point. If we can draw lines in 2D and 3D, we can draw almost everything. But we can add all the entities we need: circles, ellipses, polylines, text... This is what I have implemented in detail in FortranCAD.