Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Mentor
The_Caddie
Posts: 208
Registered: ‎06-08-2010
Message 1 of 6 (206 Views)
Accepted Solution

SETFILEPATH variable output missing backslashes

206 Views, 5 Replies
10-03-2012 02:57 AM

This is in relation to an earlier post by me however the problem relating is a little larger then I realized.

 

Has anyone noticed that when scrolling through the list of variables (accessed through the commands prompt -> Setvar ->?  

->*)

 

that all variables pointing to a path show backslashes except for SAVEFILEPATH.

 

Am I missing Somthing here or is there a way around this?

 

Thanks-

*Expert Elite*
M_Hensley
Posts: 1,679
Registered: ‎12-11-2003
Message 2 of 6 (197 Views)

Re: SETFILEPATH variable output missing backslashes

10-03-2012 04:07 AM in reply to: The_Caddie

Mine shows the backslashes here.

Mentor
The_Caddie
Posts: 208
Registered: ‎06-08-2010
Message 3 of 6 (193 Views)

Re: SETFILEPATH variable output missing backslashes

10-03-2012 04:26 AM in reply to: The_Caddie

well I aint lieing as you can see any ideas to why?

 

its actually the same on my system for Acad 2010 as well as Acad 2012 so its not a version dependant issue

 

Contributor
bobdobbs
Posts: 15
Registered: ‎09-27-2012
Message 4 of 6 (178 Views)

Re: SETFILEPATH variable output missing backslashes

10-03-2012 05:46 AM in reply to: The_Caddie

Mine also, is correct.

 

I was able to change my SAVEFILEPATH via the registry editor to one with no slashes but, not from either the OPTIONS dialog or the SETVAR function. (I suspect that the registry functions would allow an improper path to be written.) However, I was able to change it back to the correct path from either. Perhaps some errant function has incorrectly changed it.

 

I'd try changing it to the correct path (one with slashes) in OPTIONS or however you prefer and see if it is later changed back to one without slashes.

*Expert Elite*
Kent1Cooper
Posts: 5,272
Registered: ‎09-13-2004
Message 5 of 6 (175 Views)

Re: SETFILEPATH variable output missing backslashes

10-03-2012 06:00 AM in reply to: The_Caddie

The_Caddie wrote:

....

Has anyone noticed that when scrolling through the list of variables (accessed through the commands prompt -> Setvar ->?  

->*)

 

that all variables pointing to a path show backslashes except for SAVEFILEPATH.

....


The backslashes are there on the three computers I tried it on.

 

I find that it will accept a filepath without the initial backslash as a typed entry, under SAVEFILEPATH as a "command," so that may be how it happened.  [I don't think it would end up that way if done by Browsing in the Options/Files/Automatic Save File Location pane.]  I did that, typing in the right folder but without that initial backslash, and waited for it to perform an automatic save to there, and it did put it in the right place, so maybe it doesn't matter.

 

But if you want everything consistent, this will check whether that System Variable has the backslash there, and if not, add it:

 

(if (/= (substr (getvar 'savefilepath) 2 2) ":\\")

  (setvar 'savefilepath

    (strcat

      (substr (getvar 'savefilepath) 1 2); drive letter and colon

      "\\" ; add the backslash

      (substr (getvar 'savefilepath) 3); the rest

    )

  )

)

 

The same could be applied to any and all file-path-type System Variables.

Kent Cooper
Mentor
The_Caddie
Posts: 208
Registered: ‎06-08-2010
Message 6 of 6 (171 Views)

Re: SETFILEPATH variable output missing backslashes

10-03-2012 06:11 AM in reply to: The_Caddie

yess this has lead to the solution a custom program changes the location to the directory P:\Autocad Auto-save folder however only uses one backslash instead of two so though it is set corectly when prompted it displays incorectly :smileyhappy:

 

thanks

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community