Determines if the predicate is true for one of the list members
Supported Platforms: Windows and Mac OS
(vl-member-if predicate-function lst)
Type: Subroutine or Symbol
The test function. This can be any function that accepts a single argument and returns T for any user-specified condition. The predicate-function value can take one of the following forms:
Type: List
A list to be tested.
Type: List or nil
A list, starting with the first element that passes the test and containing all elements following this in the original argument. If none of the elements passes the test condition, vl-member-if returns nil.
The vl-member-if function passes each element in lst to the function specified in predicate-function. If predicate-function returns a non-nil value, vl-member-if returns the rest of the list in the same manner as the member function.
The following command draws a line:
(command "._line" '(0 10) '(30 50) nil) nil
The following command uses vl-member-if to return association lists describing an entity, if the entity is a line:
(vl-member-if '(lambda (x) (= (cdr x) "AcDbLine")) (entget (entlast))) ((100 . "AcDbLine") (10 0.0 10.0 0.0) (11 30.0 50.0 0.0) (210 0.0 0.0 1.0))