Page 1 of 1

how to pass IEnumerable

Posted: 23 Jun 2018, 18:17
by icke_siegen
may I ask for an example of how to pass an IEnumerable of handles, e.g. in

Code: Select all

Handles.SetSourceHandleRangeFromHandles(IEnumerable`1 handles, Boolean retainPattern)


I tried various versions, e.g.

Code: Select all

Handles.SetSourceHandleRangeFromHandles({"playbackHandleUN=11", "playbackHandleUN=13", "playbackHandleUN=15"}, false)


But this doesn't work, and the logs say something of an expected Int.

Re: how to pass IEnumerable

Posted: 24 Jun 2018, 21:14
by Gregory
There is no syntax to define an IEnumerable in a macro so you can only use these functions if you have property that contains or method that returns that type. For example the following would be valid but it would only allow you to select fixtures which conflict with a previous exchange operation:

Code: Select all

Handles.SetSourceHandleRangeFromHandles(Handles.GetHandles(Fixtures.ConflictingHandles), false)
It is possible to pass in a list of integer values (as of version 11) so you can do the following:

Code: Select all

Handles.SetSourceHandleRange("Playbacks", {0,2,3,4})

Re: how to pass IEnumerable

Posted: 24 Jun 2018, 21:23
by sideshowbond
so there basically is currently no way of selecting multiples playback at once based on their user number?

Re: how to pass IEnumerable

Posted: 24 Jun 2018, 22:26
by Gregory
I do not believe this is currently possible.