Stay organized with collections
Save and categorize content based on your preferences.
blockly > VariableModel
VariableModel class
Class for a variable model. Holds information for the variable including name, ID, and type.
Signature:
export declare class VariableModel implements IVariableModel<IVariableState>
Implements: IVariableModel<IVariableState>
Constructors
Methods
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\u003eVariableModel\u003c/code\u003e class stores information about a variable, including its name, ID, and type.\u003c/p\u003e\n"],["\u003cp\u003eIt has a constructor to create new instances and methods to manage its properties.\u003c/p\u003e\n"],["\u003cp\u003eKey properties include \u003ccode\u003ename\u003c/code\u003e, \u003ccode\u003etype\u003c/code\u003e, and the \u003ccode\u003eworkspace\u003c/code\u003e it belongs to.\u003c/p\u003e\n"],["\u003cp\u003eYou can access the variable's unique identifier with the \u003ccode\u003egetId()\u003c/code\u003e method.\u003c/p\u003e\n"]]],[],null,[]]