Drawing Path
To get the full path, you append the DWGPREFIX system variable
(which stores the path) to the DWGNAME system variable (which
stores the file name).
Use code such as the following example to retrieve and assign the values
of DWGNAME and DWGPREFIX to variables in AutoLISP :
(setq DN (getvar "DWGNAME"))
(setq DP (getvar "DWGPREFIX"))
Use the AutoLISP function (strcat), to concatenate the results
and assign them to a variable, for example :
(setq TM (strcat DP DN))
In this example, the variable TM contains the full path including
the file name.