You can link the note to the configuration property to be displayed on the drawing.
And for exporting DXF, you can set up the macro to pull to configuration configuration value as string and use it as file name while exporting as DXF. Here is one example for saving PDF: https://forum.solidworks.com/message/317458#comment-317458
Thank you for reply.
Now how what code should I add to save the file in current directory in a subdirectory called DXF?
You can set it directly or can add a check function to see if sub folder exists or not. If not then add it
Filepath = Left(swmodel.GetPathName, InStrRev(swmodel.GetPathName, "\"))
If Dir(Filepath & "DXF", vbDirectory) = "" Then ' Change Sub folder Name here
MkDir Filepath + "DXF" ' Change Sub folder Name here
Filepath = Filepath + "DXF\" ' Change Sub folder Name here