BIGAL Posted September 19, 2014 Posted September 19, 2014 I can not get this to work I want to pick a txt file tried all sorts of BIT settings it just does not go to the correct directory other tests work. Checked Alpha upper lower etc exactly as it appears in windows. (setq dwgname (GETVAR "dwgname")) (setq dwgname (substr dwgname 1 (vl-string-search ".dwg" dwgname))) (setq dwgname (strcat (getvar "dwgprefix") dwgname "-DATA" "\\" "advRoads-10")) ; dwgname "P:\\2010026\\Design\\2010026-PF-DATA\\AdvRoads-10" (setq fname (getfiled "Select the set out file" dwgname "txt" 4)) Quote
7o7 Posted September 19, 2014 Posted September 19, 2014 So your file name must be : "P:\\2010026\\Design\\2010026-PF.dwg" and the directory "P:\\2010026\\Design\\2010026-PF-DATA\\AdvRoads-10" must be exist to get the lisp works. Quote
BIGAL Posted September 19, 2014 Author Posted September 19, 2014 Thats corrrect I want a sub directory below the current directory level, just can not see typo's. Quote
Lee Mac Posted September 20, 2014 Posted September 20, 2014 Assuming the filepaths exist, try: (setq fname (getfiled "Select the set out file" (strcat (getvar 'dwgprefix) (vl-filename-base (getvar 'dwgname)) "-DATA\\advRoads-10") "txt" 16 ) ) Quote
BIGAL Posted September 20, 2014 Author Posted September 20, 2014 (edited) Thanks Lee will try tomorrow the flag setting may be the key. I did see the vl-filename-base this is better as it removes the .dwg. Yes that worked Lee will have a close look at fname between the two versions to figure out difference. Thanks Edited September 22, 2014 by BIGAL Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.