
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hello everyone:
I need some help...
how to get a folder name that is different depending of the REVIT VERSION.... (see underline folder name below)
(setq OldPath (getvar "dwgprefix")) ;;; I get "U:\\100000\\elec\\"
(setq len (strlen OldPath)) ;;; I get "15"
(setq FullPath2 (substr OldPath 1 (- len 1))) ;;; I get "U:\\100000\\mech"
(setq split_path (dos_splitpath FullPath2)) ;;; I get ("U:" "\\100000\\" "mech" "") break path in 4 pieces
(setq GetDrive (nth 0 split_path)) ;;; I get "U:"
(setq GetPNumber (nth 1 split_path)) ;; ; I get "\\100000\\"
(setq DirList (dos_dirtree (strcat GetDrive GetPNumber)))
DirList return a list of subfolders inside the folder "\\100000\\"...
("U:\\100000\\" "U:\\100000\\elec\\" "U:\\100000\\mech\\" "U:\\100000\\pl\\"
"U:\\100000\\Revit 2016\\" "U:\\100000\\Revit 2016\\!CAD-LINKS\\"
"U:\\100000\\Telecom\\" "U:\\100000\\x-refs\\")
I need to get the name of the "REVIT 2016" (is not always the same name) and make sure the \!CAD-LINKS\\" exist.
Any help is appreciate..
DC
Solved! Go to Solution.