Post

2 followers Follow
0
Avatar

How works "replaceVariable" ?

Hello,

 

I try to use "replaceVariable" in XLR 6.2 Plugin, but i have an error :

"Variable 'install_name' in release 'test' can be replaced by only one other variable."

Code :

myvar = VariableOrValue("cocodzadzadda","toto")
releaseApi.replaceVariable(str(vInstallName), myvar)

Thanks for your help
Ydulong

Official comment

Avatar

Hello,

If you want to replace with another variable then you should instantiate it like this:

myvar = VariableOrValue("${cocodzadzadda}",None)

If just with the value:

myvar = VariableOrValue(None,"toto")

All usages of str(vInstallName) will be replaced as the result of provided script execution.

Vitalii Karnyushin

Please sign in to leave a comment.

1 comment