std-ssget | ![]() |
(std-ssget <msg> <filter>)
(std-inp-ssget <msg> <filter> <def>)
SSGET with defaults, like '(ssx), msg-prompt and filterlist.
<def> is usually a secondary filter function, like '(ssx) or '(filter) or simplier '(ssget "X") for all.
The following predefined constants are useful filter lists:
*SSFILTER-INSERT* => '((0 . "INSERT")) *SSFILTER-POLY* => '((0 . "POLYLINE,LWPOLYLINE")) *SSFILTER-TEXT* => '((0 . "TEXT,MTEXT,ATTDEF")) *SSFILTER-TEXTALIKE* <= => *ENTITY-TYPE-TEXTALIKE* (+ dimension, attrib)
handles pre-selected picksets, even if there was a command call before, as it happens with (command "_UNDO" "_BEGIN") at the start of almost every command.
The -INP- version handles defaults..
Examples:
;;;Standard usage, no filtering
(std-ssget nil nil)
;;; Select Blocks only
(std-ssget "Select blocks" *SSFILTER-INSERT*)
;;; Blocks only
(std-inp-ssget "Select blocks/ENTER for all blocks" *SSFILTER-INSERT* '(ssget "X" '((0 . "INSERT"))))
;;; pass to SSX with empty input
(std-inp-ssget "Select objects/ENTER for SSX" nil '(ssx))
msg: a string to be displayed as a prompt. If nil "\nSelect objects: " is prompted.
filter: a alist of allowed dxf pairs, see SSGET
def: default value or nil
Same as SSGET.
Interrupts the program flow, prints the formatted message and waits for user input if there is no pre-selected pickset
(std-require 'STDINPUT)
Defined in STDINPUT