Jump to content

Recommended Posts

Posted

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.

Posted

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?

Posted

Thanks that did it.

 

I thought if I get out of the first command function its impossible to continue it.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...