Stay organized with collections
Save and categorize content based on your preferences.
blockly > VariableMap > getAllVariables
VariableMap.getAllVariables() method
Return all variables of all types.
Signature:
getAllVariables(): IVariableModel<IVariableState>[];
Returns:
IVariableModel<IVariableState>[]
List of variable models.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-16 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-16 UTC."],[[["\u003cp\u003eThe \u003ccode\u003egetAllVariables()\u003c/code\u003e method retrieves all variables, regardless of their type, associated with a specific workspace.\u003c/p\u003e\n"],["\u003cp\u003eIt returns a list of \u003ccode\u003eVariableModel\u003c/code\u003e objects, each representing a single variable within the workspace.\u003c/p\u003e\n"]]],[],null,["[blockly](./blockly.md) \\\u003e [VariableMap](./blockly.variablemap_class.md) \\\u003e [getAllVariables](./blockly.variablemap_class.getallvariables_1_method.md)\n\nVariableMap.getAllVariables() method\n------------------------------------\n\nReturn all variables of all types.\n\n**Signature:** \n\n getAllVariables(): IVariableModel\u003cIVariableState\u003e[];\n\n**Returns:**\n\n[IVariableModel](./blockly.ivariablemodel_interface.md)\\\u003c[IVariableState](./blockly.ivariablestate_interface.md)\\\u003e\\[\\]\n\nList of variable models."]]