Message 1 of 20
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I want to select a Layout using initget.
I wrote the following function to do that for me. Its working when there are no spaces within the Layoutname but if there are spaces in it, for example "A0 - view A", then it does not work.
Any suggestions?
(defun setlayout (/ list2String) ; checks if its in Model area, if so, asks the user to change
(if (= (getvar "ctab") "Model")
(progn
(defun list2String (lst space / str)
(setq str (car lst))
(foreach itm (cdr lst)
(setq str (strcat str space itm))
)
str
)
(initget 1 (list2String (layoutlist) " "))
(setvar "ctab" (getkword (strcat "Select Layout [" (list2String (layoutlist) "/") "]: ")))
)
)
);defun
Solved! Go to Solution.