Tharwat Posted June 24, 2014 Posted June 24, 2014 Try this simple routine and pay your attention to the command line at the end of the program , you should see a list of the values . (defun c:Test (/ o f str p lst) (if (and (setq o (getfiled "" (getvar 'dwgprefix) "csv" 16)) (setq f (open o "r")) ) (progn (while (setq str (read-line f)) (if (setq p (vl-string-search "," str 0)) (setq lst (cons (substr str 1 p) lst)) ) ) (close f) ) ) (if lst (setq lst (reverse lst)) ) ) Quote
jmerch Posted June 24, 2014 Posted June 24, 2014 ("Number" "1" "2" "3" "4" "5" "6") so...for each 'lst', I need to perform my commands....am I thinking right? Quote
Tharwat Posted June 24, 2014 Posted June 24, 2014 ("Number" "1" "2" "3" "4" "5" "6") Good , is not that what you've looking for since your first question in this thread ? so...for each 'lst', I need to perform my commands....am I thinking right? Correct , but it also depends on what you are trying to do with the list ? Quote
jmerch Posted June 24, 2014 Posted June 24, 2014 Yes that is what I was looking for, my initial thought was to populate this list in order to separate it out. Then the more I got into it, I liked the idea of skipping that step and just having the LISP execute my commands 'foreach' number in the list, keeping that 'setq' definition saved so I can use it in my filter. Quote
Tharwat Posted June 24, 2014 Posted June 24, 2014 Then the more I got into it, I liked the idea of skipping that step and just having the LISP execute my commands 'foreach' number in the list, keeping that 'setq' definition saved so I can use it in my filter. Just ask if you stuck with any of your process with LISP and not with your third party commands . 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.