Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Current drawing directory name

7 REPLIES 7
Reply
Message 1 of 8
Anonymous
182 Views, 7 Replies

Current drawing directory name

In LISP code, how do I get the directory name of the current drawing into a string variable?
7 REPLIES 7
Message 2 of 8
Anonymous
in reply to: Anonymous

(setq folder (vl-filename-directory (getvar "dwgprefix")))

--
Autodesk Discussion Group Facilitator


wrote in message news:5683623@discussion.autodesk.com...
In LISP code, how do I get the directory name of the current drawing into a
string variable?
Message 3 of 8
Anonymous
in reply to: Anonymous

Jason,

Is there a reason you add the 'vl-filename-directory'?

Command: (getvar "dwgprefix")
"C:\\Documents and Settings\\---\\My Documents\\"

Command: (vl-filename-directory (getvar "dwgprefix"))
"C:\\Documents and Settings\\---\\My Documents"

--

Tim
"A blind man lets nothing block his vision."


"Jason Piercey" wrote in message
news:5683627@discussion.autodesk.com...
(setq folder (vl-filename-directory (getvar "dwgprefix")))

--
Autodesk Discussion Group Facilitator


wrote in message news:5683623@discussion.autodesk.com...
In LISP code, how do I get the directory name of the current drawing into a
string variable?
Message 4 of 8
Anonymous
in reply to: Anonymous

Nope. Brain fart..

--
Autodesk Discussion Group Facilitator


wrote in message news:5683648@discussion.autodesk.com...
Jason,

Is there a reason you add the 'vl-filename-directory'?

Command: (getvar "dwgprefix")
"C:\\Documents and Settings\\---\\My Documents\\"

Command: (vl-filename-directory (getvar "dwgprefix"))
"C:\\Documents and Settings\\---\\My Documents"
Message 5 of 8
Anonymous
in reply to: Anonymous

Thank you very much, especially for such a quick reply. I am impressed.

Sassy
Message 6 of 8
Anonymous
in reply to: Anonymous

You're welcome. Please note Tim's post.

--
Autodesk Discussion Group Facilitator


wrote in message news:5683662@discussion.autodesk.com...
Thank you very much, especially for such a quick reply. I am impressed.

Sassy
Message 7 of 8
Anonymous
in reply to: Anonymous

On second look, I suppose the only difference is the trailing \\.
How important it is to the OP, I'm not sure.

--
Autodesk Discussion Group Facilitator


wrote in message news:5683648@discussion.autodesk.com...
Jason,

Is there a reason you add the 'vl-filename-directory'?

Command: (getvar "dwgprefix")
"C:\\Documents and Settings\\---\\My Documents\\"

Command: (vl-filename-directory (getvar "dwgprefix"))
"C:\\Documents and Settings\\---\\My Documents"
Message 8 of 8
Anonymous
in reply to: Anonymous

True. I thought maybe you saw something else happen once, and you started
using that way by default.

Thanks for the clarification Jason.

--

Tim
"A blind man lets nothing block his vision."


"Jason Piercey" wrote in message
news:5683671@discussion.autodesk.com...
On second look, I suppose the only difference is the trailing \\.
How important it is to the OP, I'm not sure.

--
Autodesk Discussion Group Facilitator


wrote in message news:5683648@discussion.autodesk.com...
Jason,

Is there a reason you add the 'vl-filename-directory'?

Command: (getvar "dwgprefix")
"C:\\Documents and Settings\\---\\My Documents\\"

Command: (vl-filename-directory (getvar "dwgprefix"))
"C:\\Documents and Settings\\---\\My Documents"

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost