DWGNAME (System Variable)

Stores the name of the current drawing.

(Read-only)
Type:String
Saved in:Not-saved
Initial value:Drawing1.dwg

If a new drawing has not been saved yet, DWGNAME defaults to Drawing1.dwg. Additional new drawings are named Drawing2.dwg, Drawing3.dwg, and so on.

The location of the saved drawing file is stored in DWGPREFIX.