MetaData variables in Python XMC scripts
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎02-28-2018 09:00 PM
Hello all,
how is the correct value assignement for variables in the META section of an python script?
TCL scripts show's like these:
#@ScriptDescription "Copy config while onboarding"
#@SectionStart (description = "Select configuration" )
#
#@VariableFieldLabel (description = "ConfigName"
# type = String
# scope = device
# )
set var ConfigName ""
#@SectionEnd
How do you have to replace set var ConfigName "" in python?
If I try ConfigName = "" the Device Settings section is empty if I run the script.
So what is the correct syntax?
Best regards
Stephan
how is the correct value assignement for variables in the META section of an python script?
TCL scripts show's like these:
#@ScriptDescription "Copy config while onboarding"
#@SectionStart (description = "Select configuration" )
#
#@VariableFieldLabel (description = "ConfigName"
# type = String
# scope = device
# )
set var ConfigName ""
#@SectionEnd
How do you have to replace set var ConfigName "" in python?
If I try ConfigName = "" the Device Settings section is empty if I run the script.
So what is the correct syntax?
Best regards
Stephan
Regards
Stephan
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎06-08-2018 09:05 PM
Hello,
here is the working solution for my problem for the sake of completeness:
#@VariableFieldLabel (description = "ConfigName",
# type = String,
# scope = global
# )
set var ConfigName
#To use the variable
configfile = emc_vars["ConfigName"]
Best regards
Stephan
here is the working solution for my problem for the sake of completeness:
#@VariableFieldLabel (description = "ConfigName",
# type = String,
# scope = global
# )
set var ConfigName
#To use the variable
configfile = emc_vars["ConfigName"]
Best regards
Stephan
Regards
Stephan
