std-ssget


Synopsis

(std-ssget <msg> <filter>)

(std-inp-ssget <msg> <filter> <def>)

Description

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)
The enhancements over SSGET are:
msg is nicely formatted.

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))

Arguments

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

Return Value

Same as SSGET.

Side Effects

Interrupts the program flow, prints the formatted message and waits for user input if there is no pre-selected pickset

Module

(std-require 'STDINPUT)

Defined in STDINPUT