Skip to main content

Home > blockly > Variables > getVariableUsesById

Variables.getVariableUsesById() function

Find all the uses of a named variable.

Signature:

export declare function getVariableUsesById(workspace: Workspace, id: string): Block[];

Parameters

ParameterTypeDescription
workspaceWorkspaceThe workspace to search for the variable.
idstringID of the variable to find.

Returns:

Block[]

Array of block usages.