Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

String to coordinate list

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
scottbolton
689 Views, 3 Replies

String to coordinate list

I have a STRING, "(0 0 0) (1 0 0) (1 1 0) (0 1 0)". Is there an easy way to translate this to a list of coordinates or do I just use multiple searches for "(" and " "?

 

S

3 REPLIES 3
Message 2 of 4
t.willey
in reply to: scottbolton

Command: (read (strcat "(" "(0 0 0) (1 0 0) (1 1 0) (0 1 0)" ")"))
((0 0 0) (1 0 0) (1 1 0) (0 1 0))

Message 3 of 4
scottbolton
in reply to: t.willey

So quick! So easy! Thanks, Tim.

 

S

Message 4 of 4
t.willey
in reply to: scottbolton

You're welcome Scott.  Just one of those tricks you learn when working with DCL listboxes.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost