TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: sln8458 on February 26, 2021, 10:00:37 AM

Title: ssget HELP
Post by: sln8458 on February 26, 2021, 10:00:37 AM
I'm trying to create a selection set of 3Dsolids to be subtracted from another 3dsolid.
First I wanted to a see the selection set move to verify the code.
ALL of the first selection set exist on a new layer HOLES, there is nothing else on this layer.
However i keep getting 'bad argument'
My first attempt was:
Code: [Select]
(command "move" (ssget "_x" ((0 . "3DSOLID")(8 . "HOLES"))) "0,0,0" "500,0,0")Failed:bad argument
Further reading on the net suggested adding sssetfirst:
Code: [Select]
(command "move" (sssetfirst nil(ssget "_x" ((0 . "3DSOLID")(8 . "HOLES")))) "0,0,0" "500,0,0")Again failed:bad argument

Any pointers please?


S
Title: Re: ssget HELP
Post by: Jeff_M on February 26, 2021, 10:46:48 AM
You are missing the quote for the list and the return after getting the selection:
Code - Auto/Visual Lisp: [Select]
  1. (command "move" (ssget "_x" '((0 . "3DSOLID")(8 . "HOLES"))) "" "0,0,0" "500,0,0")
  2.  
Title: Re: ssget HELP
Post by: sln8458 on February 26, 2021, 11:26:02 AM
Thanks Jeff

All that head scratching for just a single '  Arhhhh
Plus the ""