Tools for Selection

  • Hello Guys!

    is it possible to make a selection by half of a group in macro or lua plug?

    If I take a group of 10 machines .... have a selection of the first 5 ...

    if I take a group of 8 machines ... have a selection of the first 4 ...

    If I take a group of 6 machines ... have a selection of the first 3 ...


    Regards...

    Julien

    Light Programmer, France

  • Assuming your group is a regular linearized selection, this could be done by setting the MAtricks XWidth property to half of the number of selected fixtures, to wrap the second half to the next row, then sub-select either of the two rows via the MAtricks Y property.


    By using XWidth&Y instead of the more commonly known XBlock&X, you preserve the ability to align on the resulting sub-selection.


    You will need Lua to retrieve and divide the number of currently selected fixtures, if you want to avoid to calculate and enter this manually.


    example:

    Lua "Cmd([[MAtricks 'XWidth' '%.f' 'Y' '0']], SelectionCount()/2)"