Home > blockly > Variables > allUsedVarModels
Variables.allUsedVarModels() function
Find all user-created variables that are in use in the workspace. For use by generators.
To get a list of all variables on a workspace, including unused variables, call getAllVariables.
Signature:
export declare function allUsedVarModels(ws: Workspace): IVariableModel<IVariableState>[];
Parameters
| Parameter | Type | Description |
|---|---|---|
| ws | Workspace | The workspace to search for variables. |
Returns:
IVariableModel<IVariableState>[]
Array of variable models.