txt to dxf conversion is possible, but only if the .txt file in question contains vector data in so called list of points files. Such files contain data that are typically saved in two columns that represent vector data. Typically a unique extension is used instead txt, but in essence these files are readable in any text editor.
You will need a special translation software, or a CAD/3D modeling software that can process such files in order to generate the common 2D DXF CAD files.