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

SETFILEPATH variable output missing backslashes

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
The_Caddie
601 Views, 5 Replies

SETFILEPATH variable output missing backslashes

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-

5 REPLIES 5
Message 2 of 6
M_Hensley
in reply to: The_Caddie

Mine shows the backslashes here.

Message 3 of 6
The_Caddie
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

 

Message 4 of 6
bobdobbs
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.

Message 5 of 6
Kent1Cooper
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, AIA
Message 6 of 6
The_Caddie
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 🙂

 

thanks

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

Post to forums  

Autodesk Design & Make Report

”Boost