App Designer - increment component
3 views (last 30 days)
Marc Servagent on 9 Apr 2021
I try to increment the name of a component in app designer, in order to create a loop,
hereafter an example:
app.Lamp.Color_i = [0 0 0]
Of course, the above example does not work, I tryed several type of concantenate functions, and also eval function, but I did not succed.
Thanks in advance for any help !
Monisha Nalluru on 12 Apr 2021
From my understanding, you want to access the uilamp present in the app using app designer.
If uilamps are named as Lamp1, Lamp2, Lamp3 and so on.
Then you can access them using the following statement
app.("Lamp"+i).Color = "red";
Hope this helps!