In a Python script, Is there an easy way to get the ID of an Indigo variable (if you know its name) without having to iterate through the list of variables doing a name comparison
Can't seem to find the answer to this one
indigo.variables["MyVarName"].id
RogueProeliator wrote:You should be able to refer to it by name, then the ID is just a property:
- Code: Select all
indigo.variables["MyVarName"].id
Adam
indigo.variables.getId("MyVarName")
matt (support) wrote:It is recommended if possible to use the ID in the script since it won't change if the object is renamed. There are cases where you may not want to do this though, in which case here is a slightly more efficient version of what Adam posted:
- Code: Select all
indigo.variables.getId("MyVarName")
Sounds like I am spoilt for choice - thanks for the feedback
Users browsing this forum: No registered users and 6 guests