std-tbl-layer | ![]() |
"general layer name accessor"
STD-TBL-LAYER scans the list of layers in the current AutoCAD drawing for the given table and returns a list of the layer names dependent of the four filters match, must, ignore and ison.
It returns all layer names which flags in <must> must be set, and which flags in <ignore> may not be set, using wcmatch with <match> on the name.
Returns all layer names which flags in <must> must be set, and which flags in <ignore> may not be set, using wcmatch with match on the name,
ison=0: ignore on/off;
1: only turned on layers
-1: only turned off layers
to be continued
The following constants are defined to make the function call readable:
STD:LAY-THAWED 0 ;1.Arg - must
STD:LAY-FROZEN 1 ;1.Arg - must
STD:LAY-LOCKED 4 ;1.Arg - must
STD:LAY-EXIST 64 ;1.Arg - must
STD:LAY-EXTERN 48 ;2.Arg - ignore
STD:LAY-ON 1 ;3.Arg - on/off
STD:LAY-OFF -1 ;3.Arg - on/off
STD:LAY-ON-OR-OFF 0 ;3.Arg - on/off
Note
The more general STD-TBL function defines some more constants which might be useful here also:
STD:TBL-ALL 0
STD:TBL-EXTERN 16 ; external dependent (XREF)
STD:TBL-BOUND 32 ; bound external xref
STD:TBL-EXIST 64 ; referenced, not valid if >= r13
Exceptional Situation
If tbl doesn't match satisfy STD-TBL-P an AutoLISP error will occur.
(std-tbl-layer "*" STD:LAY-THAWED STD:TBL-ALL
=> all layer names
STD:LAY-ON-OR-OFF)
(std-tbl-layer "*" (+ STD:LAY-FROZEN STD:LAY-EXIST)
=> all existing + frozen + off layer names, ignoring external
STD:LAY-EXTERN STD:LAY-OFF)
tbl: string which must be a valid symbol table, see std-tbl-p
match: a string, suitable for wcmatch.
must: a integer, a positive bit filter for the table flag 70.
ignore: a integer, a negative bit filter for the table flag 70.
ison: a integer number;
if 0 on/off layer settings are ignored, if positive only ON layers are returned, if negative only OFF layers are returned
String-list. A list of layer names.
None.
(std-require 'STDTBL)
Defined in STDTBL