Gets the value of a configuration variable.
(tpm_varget var_id var_name)
Returns a variable value or nil.
var_id | Configuration variables ID (real) |
var_name | Variable name (string) |
Configuration variables are composed of cleanup variables, cleanup action variables and topology variables. The variables are initialized to their default values. For a list of these variables and their default values, see Configuration Variables.
The following code opens a topology, stores the topology's configuration values in a new set of variables, and gets the value of NODE_LAYER.
(setq tpm_id (tpm_acopen "SampleTopo")) (setq var_id (tpm_varalloc)) (tpm_infobuildvar tpm_id var_id) (tpm_acclose tpm_id) (setq nlayer (tpm_varget var_id "NODE_LAYER"))