M76 Posted November 13, 2009 Posted November 13, 2009 Hi I have a list of xy coordinates and I'd like to create a multiline with the coordinates. How can I pass the list to the "mline" command? If I use this code, the result is nothing: (command "_mline" "_j" "_z" "_s" mlscale "_st" "STANDARD" vert-list "") the vert-list is the list of points. If I use (nth 0 vert-list) (nth 1 vert-list)... etc it works, but since the length of the list is not fixed its not a possible solution. I alse tried foreach with no success, maybe the syntax is off I have no idea. Quote
Freerefill Posted November 13, 2009 Posted November 13, 2009 Something like this should get you started: (vl-cmdf "_mline" "_j" "_z" "_s" mlscale "_st" "STANDARD") (foreach forVar vert-list (vl-cmdf forVar)) (vl-cmdf "") Perhaps the problem you were having was that you weren't sending the points as a continuation of the command? Quote
M76 Posted November 13, 2009 Author Posted November 13, 2009 Thanks that did it. I thought if I get out of the first command function its impossible to continue it. 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.