Mike.Perry
2004-10-13, 10:48 AM
Hi
Need a little help here please, the following are just examples -
(setq DwgPath1 (getvar "DwgPreFix"))
"C:\\AutoCAD\\Support\\Lib\\Details\\Concrete"
(setq DwgPath2 (getvar "DwgPreFix"))
"C:\\Support\\Lib\\StandardDetails"
(setq DwgPath3 (getvar "DwgPreFix"))
"X:\\AutoCAD2005\\Lib\\Manufacture\\SteelWorkDetails" <- There shouldn't be a space between ls (can't get formatting to remove it)
I need to delete / remove everything left of "Lib" ie
DwgPath1 -> "Lib\\Details\\Concrete"
DwgPath2 -> "Lib\\StandardDetails"
DwgPath3 -> "Lib\\Manufacture\\SteelWorkDetails"
I can then use vl-string-translate to replace \\ with / ie
DwgPath1 -> (vl-string-translate "\\" "/" "Lib\\Details\\Concrete")
"Lib/Details/Concrete"
DwgPath2 -> (vl-string-translate "\\" "/" "Lib\\StandardDetails")
"Lib/StandardDetails"
DwgPath3 -> (vl-string-translate "\\" "/" "Lib\\Manufacture\\SteelWorkDetails")
"Lib/Manufacture/SteelWorkDetails"
Thanks, Mike
Need a little help here please, the following are just examples -
(setq DwgPath1 (getvar "DwgPreFix"))
"C:\\AutoCAD\\Support\\Lib\\Details\\Concrete"
(setq DwgPath2 (getvar "DwgPreFix"))
"C:\\Support\\Lib\\StandardDetails"
(setq DwgPath3 (getvar "DwgPreFix"))
"X:\\AutoCAD2005\\Lib\\Manufacture\\SteelWorkDetails" <- There shouldn't be a space between ls (can't get formatting to remove it)
I need to delete / remove everything left of "Lib" ie
DwgPath1 -> "Lib\\Details\\Concrete"
DwgPath2 -> "Lib\\StandardDetails"
DwgPath3 -> "Lib\\Manufacture\\SteelWorkDetails"
I can then use vl-string-translate to replace \\ with / ie
DwgPath1 -> (vl-string-translate "\\" "/" "Lib\\Details\\Concrete")
"Lib/Details/Concrete"
DwgPath2 -> (vl-string-translate "\\" "/" "Lib\\StandardDetails")
"Lib/StandardDetails"
DwgPath3 -> (vl-string-translate "\\" "/" "Lib\\Manufacture\\SteelWorkDetails")
"Lib/Manufacture/SteelWorkDetails"
Thanks, Mike