rodrigo_sjc_sp Posted October 3, 2012 Posted October 3, 2012 I need select a Polyline with a variable, This code is ok! (setq selpline (ssget "_x" '((0 . "LWPOLYLINE")(8 . "First")))) I need convert to: (setq cod "Second") (setq selpline (ssget "_x" '((0 . "LWPOLYLINE")(8 . cod)))) But this code return Command: ; error: bad SSGET list value I need help to make this code. Thanks Rodrigo Quote
Tharwat Posted October 3, 2012 Posted October 3, 2012 The name of the layer should be string like the first line of code you brought . (8 . "cod") Quote
Lee Mac Posted October 3, 2012 Posted October 3, 2012 http://www.cadtutor.net/forum/showpost.php?p=258390&postcount=20 Quote
rodrigo_sjc_sp Posted October 4, 2012 Author Posted October 4, 2012 if i use (setq valor "X1") (setq selpline (ssget "_x" '((0 . "LWPOLYLINE")(8 . "valor")))) The lisp does not recognize the value of the variable If use variable with "" the lisp recognize VALOR and not X1 Any help? Quote
Tharwat Posted October 4, 2012 Posted October 4, 2012 if i use (setq valor "X1") (setq selpline (ssget "_x" '((0 . "LWPOLYLINE")(8 . "valor")))) The lisp does not recognize the value of the variable If use variable with "" the lisp recognize VALOR and not X1 Any help? Hola . It should like this . (setq valor "X1") (setq selpline (ssget "_x" [b](list[/b] '(0 . "LWPOLYLINE")([b]cons[/b] 8 valor)))) Quote
Lee Mac Posted October 4, 2012 Posted October 4, 2012 if i use (setq valor "X1") (setq selpline (ssget "_x" '((0 . "LWPOLYLINE")(8 . "valor")))) The lisp does not recognize the value of the variable If use variable with "" the lisp recognize VALOR and not X1 Any help? Did you read the post I linked to? 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.