std-entity-subtype-p | ![]() |
(std-nentsel-parent <ele>) ; ENAME of nentsel'ed parent block
(std-entity-subtype-p <ele> <type>) ; correct type of nested entity?
(std-nentsel-block-p <ele>) ; nentsel-picked block?
All three functions accept besides the usual entity types, entget-lists and entsel-picklists also nentsel picklists.
STD-NENTSEL-PARENT returns the parent entity of a with (NENTSEL) picked nested subentity.
If the entity is not a with (NENTSEL) picked block it just returns the entity name as with (STD-ENTITY ele).
STD-ENTITY-SUBTYPE-P is the same as (STD-ENTITY-TYPE-P) only when used with (NENTSEL) it uses the parent block of the nested subentity.
The type must be defined as exact uppercase string or list of those strings.
STD-NENTSEL-BLOCK-P is a predicate if the argument is a with NENTSEL picked INSERT entity. Used by STD-NENTSEL-PARENT.
Definition
;;; returns ENAME of the parent block of an with (nentsel) picked element (defun STD-NENTSEL-PARENT (ele) (if (std-nentsel-block-p ele) (car (nth 3 ele)) (std-entity ele))) ;;; for (nentsel) objects (defun STD-ENTITY-SUBTYPE-P (ele typ) (std-entity-type-p (std-nentsel-parent ele) typ)) (defun STD-NENTSEL-BLOCK-P (ele) (and (listp ele)(= 4 (length ele)) (= (type (car (nth 3 ele))) 'ENAME)))
ele: Either an entity type, entget-list, entsel picklist or nentsel picklist.
type: A string or a list of strings
STD-NENTSEL-PARENT returns a lisp atom of type ENAME or nil.
The predicates return either T or nil.
None.
(std-require 'STDENT)
Defined in STDENT