In my command I want to let user select entities, but if he wants, he should be able to use KWord. Something like command with prompt:
Select elements od [Settings]:
I know that I can use KWord while entsel
.
But entsel
allows me to select only one entity,
ssget
let me select many entities - which is neede, but can't use KWords.
Or I mismatched something ?
Do You know any way to join both: select many entities and KWord?
Since the AutoLISP
ssget
function offers its own keywords to allow the user to initiate any of the standard selection methods (Window, Crossing, Fence, etc.), it is not one of the functions supported by theinitget
(keyword initialising) function:There are two alternative techniques that come to mind which could potentially allow the user to supply arbitrary predefined keywords whilst also permitting multiple selection:
Use an
entsel
ornentsel
selection within awhile
loop, permitting multiple single-pick selections (i.e. selection using the pickbox aperture, with no window selection).Develop your own
ssget
function through the use of thegrread
function within a loop to continuously capture user input.I attempted the latter back in 2010, when I developed a 'UCS-aligned ssget function' (i.e. such that the selection window is aligned with the active UCS) - with full control over how user input is handled, you can then define your own keywords and react accordingly when the input matches such keywords: