|
![]() |
(tblsearch "style" "simplex3") If a text style called simplex3 is found, its entry is returned in a form similar to entries returned by tblnext (see tblnext below). If the specified text style is not found, nil is returned.
An optional third, non-nil argument can be used to affect the tblnext
function (see tblnext below) so that the next use of tblnext returns the
entry following the one reported by this use of tblsearch.
Assuming 2 layers are present in the drawing -- the default layer 0 and another one called "1A" with color 1 (red) and hidden linetype, created by the user:
(tblnext "layer" 1) the 1 causes the return of the first
entry in the table (not because it is number 1, but because it is non-nil;
anything that is non-nil could be used as the optional second argument
to rewind the pointer back to the beginning of the table. Here is
a partial sample of what is returned:
((0 . "LAYER") - - - - - - table category
(symbol type)
(2 . "0") - - - - - - - - - - - layer name
(70 . 0) - - - - - - - - - - - flags
(62 . 7) - - - - - - - - - - - - color number, negative
if off
(6 . "CONTINUOUS")) - - linetype
(tblnext "layer") returns the next entry in the table (note the absence
of the second argument). See "Note" below):
((0 . "LAYER")
(2 . "lA")
(70 .0)
(62. 1)
(6 . "HIDDEN"))
If no more entries exist in the table, nil is returned.
Note: If the last use of the tblsearch function (see tblsearch above) included a non-nil third argument, then the above tblnext function would return information on the next entry in the table after the one specified in that tblsearch function.
Blocks have a -2 code which holds the entity name of the first entity
in the block. This entity name can be used by the entnext and entget functions
if you want to access the entities contained in the block.
(snvalid "layer25") returns T
(snvalid "layer 25") returns nil because of the space
(snvalid "block-abc") returns T
(snvalid "block/abc") returns nil because of the forward slash
(tblobjname "layer" "red") returns the entity name for a layer
"red" if such a layer exists.