Help with SSGET

Help with SSGET

msarqui
Collaborator Collaborator
548 Views
3 Replies
Message 1 of 4

Help with SSGET

msarqui
Collaborator
Collaborator

Hi guys,

 

I am having a hard day with a ssget selection with a list of blocks.

My variable blklst has this value ("A$C53873E18" "p1115" "p915")

So I am trying:

(setq sel (ssget "_X" (list '(0 . "INSERT") (cons 2 blklst) (cons 410 (getvar "CTAB")))))

And Autocad give : ; error: bad SSGET list value

 

Thanks for your help.

Marcelo 

0 Likes
Accepted solutions (1)
549 Views
3 Replies
Replies (3)
Message 2 of 4

hmsilva
Mentor
Mentor
Accepted solution

Hi Marcelo,

if blklst are INSERT names...

 

(setq sel (ssget "_X" (list '(0 . "INSERT") (cons 2 (vl-string-left-trim "," (apply 'strcat (mapcar '(lambda (x) (strcat "," x)) blklst)))) (cons 410 (getvar "CTAB")))))

 

Hope this helps,
Henrique

EESignature

0 Likes
Message 3 of 4

msarqui
Collaborator
Collaborator
Many thanks Henrque, you saved my day.
Marcelo
0 Likes
Message 4 of 4

hmsilva
Mentor
Mentor

@msarqui wrote:
Many thanks Henrque, you saved my day.
Marcelo

You're welcome, Marcelo!
Glad I could help

Henrique

EESignature

0 Likes