User Tools

Site Tools


macros:example:alignfixtures

Example

Programmer - Align Fixtures

by: Kim Wida, June 2018
published: http://forum.avolites.com/viewtopic.php?f=20&t=5796
description: Align Fixtures with spread
remarks: somewhat uncomplete as the alignMask is missing

functions

affected properties

Code

align_example.xml
<?xml version="1.0" encoding="utf-8"?>
<avolites.macros>
  <macro id="Test_Align">
    <name>Test Align</name>
   <sequence>
 
      <step pause="0.01">ActionScript.SetProperty.Boolean("Programmer.Editor.Fixtures.ClearAlignMask",false)</step>
      <step pause="0.01">ActionScript.SetProperty.Enum("Programmer.Editor.Fixtures.AlignMode","Interpolate")</step>
      <step pause="0.01">ActionScript.SetProperty.Boolean("Programmer.Editor.Fixtures.AlignAddAllToProgrammer",false)</step>
      <step pause="0.01">ActionScript.SetProperty.Boolean("Programmer.Editor.Fixtures.AlignCopyPaletteReferences",false)</step>   
 
      <step pause="0.01">Selection.Context.Programmer.SelectFixture(handle:"Location=Fixtures,1,1")</step>
      <step pause="0.01">Palette.ApplyPalette(handle:"Location=Colours,1,14", false)</step>
 
      <step pause="0.01">Selection.Context.Programmer.SelectFixture(handle:"Location=Fixtures,1,8")</step>
      <step pause="0.01">Palette.ApplyPalette(handle:"Location=Colours,1,15", false)</step>
 
      <step pause="0.01">Group.RecallGroupNumeric(5)</step>
 
      <step pause="0.01">AlignSelection.SelectFixture(handle:"Location=Fixtures,1,1")</step>
      <step pause="0.01">AlignSelection.SelectFixture(handle:"Location=Fixtures,1,8")</step>
 
      <step pause="0.01">Programmer.Editor.Fixtures.Align()</step>
    </sequence>
  </macro>
</avolites.macros>

Explanation

This explains the functional steps within the sequence. For all the other XML details please refer to Formats and syntax

The macro works pretty similar to how align is called in real life:

  • a few parameters are set
    • Programmer.Editor.Fixtures.ClearAlignMask is the Auto Reset Mask menu item
    • Programmer.Editor.Fixtures.AlignMode sets whether the values should be repeated or spread
    • Programmer.Editor.Fixtures.AlignAddAllToProgrammer lets the aligned values not go into the programmer
    • Programmer.Editor.Fixtures.AlignCopyPaletteReferences is the Palette References Lost/Maintained menu button
  • some fixtures are set to some palettes (fixture 1 to palette 14, fixture 8 to palette 15)
  • the fixtures which shall be aligned are called by their group (group 5)
  • the align command is called

As mentioned in the forum, currently the AlignMask canot be set:

It works. But I don't know how to set align mask.

<step pause="0.01">ActionScript.SetProperty.SetFlag("Attribute.Mask.Align.Value","C")</step>
<step pause="0.01">ActionScript.SetProperty.String("Attribute.Mask.Align.Value","C")</step>
<step pause="0.01">ActionScript.SetProperty("Attribute.Mask.Align.Value","C")</step>


They don't work.

How to use it

You could leave a comment if you were logged in.
macros/example/alignfixtures.txt · Last modified: 2019/01/15 15:38 by sideshowbond