Get or Set Constant
constant_valueReads or sets the value of an existing constant in the Xojo IDE project, with sets verified by reading back. Omit the value to read a constant; renaming or retyping needs an on-disk edit.
Instructions
Gets or sets the value of a project constant in the Xojo IDE. The constant must already exist in the project. A set is read back, so a name that matches no constant is reported rather than silently ignored; a get of such a name returns an empty value, the same as an empty constant. It changes the value only: to rename or retype a constant, edit its #tag Constant line on disk (scaffold_code_block writes one). A set stays in the IDE until save_project. Needs the Xojo IDE running with the project open.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Constant name, fully qualified, e.g. 'App.kVersion' or 'Module1.kLimit'; a bare name may not resolve | |
| value | No | New value, as text. Omit to read the current value instead. |