Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I can't figger out why my code below gives: error: bad argument type: consp "" instead of "B"
(setq str (strcat (substr (getvar 'dwgname) 1 (vl-string-search ".dwg" (getvar 'dwgname))) " "))
(while (/= str "")
(setq
sub (substr str 1 (setq i (vl-string-search " " str)))
ret (cons sub ret)
str (substr str (+ i 2))
)
)
(reverse ret)
;returns ("RV" "CZE" "B" "W0100" "P")
(setq e (nth 3 str))
Thanks in advance!
Solved! Go to Solution.