AfraLisp Blog

The AutoLisp/Visual Lisp/VBA Resource Website

AfraLisp Blog

Home Newsletter Utter Rubbish Coding Tips AutoCAD Tips Contact Downloads WAUN


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.

The AutoLisp/Visual Lisp/VBA Resource Website

Copyright 1999-Perpetuity by AfraLisp

All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage

The AutoLisp/Visual Lisp/VBA Resource Website