nsk@LastBlockID
Retrieve the identifier of the block defined immediately before the most recently created block.
This is an unstable API, only used internally. Deprecated in favor of \nskID
Overview
The \nskLastBlockID
command provides a convenient alias to fetch the identifier of the block defined immediately preceding the most recently created block in a Neural Sketch diagram. It saves you from manually tracking auto-generated or user-defined IDs when you need to reference the prior element.
Usage
Although \nskLastBlockID
takes a numerical argument, it is currently hard-coded to use an offset of 2 (i.e. always returns the block immediately before the last). Passing any number will yield the same result until this behavior is extended.
Parameters
n
(number
, default=2
): Offset index (1-based) counting backwards from the most recently created block. Currently fixed at2
to return the previous block’s ID.
Practical Example
Internal Behavior
Internally, \nskLastBlockID
simply calls the lower-level macro \nskBlockIDLast
with a hard-coded offset of 2
, retrieving the second-last entry from Neural Sketch’s internal history of block IDs.
Reference Table
Prop | Type | Default |
---|---|---|
n? | number | 2 |