User Tools

Site Tools


macros:example:setfancurve

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

macros:example:setfancurve [2019/03/09 20:52] (current)
icke_siegen created
Line 1: Line 1:
 +Example
  
 +====== Set Fan Curve ======
 +
 +^ by: | Gregory Haynes, January 2019 |
 +^ published: | http://​forum.avolites.com/​viewtopic.php?​f=20&​t=5962 |
 +^ description:​ | Macros to set the fan curve. May be put in buttons for easy access. Buttons will show the currently selected curve. |
 +^ remarks: |  |
 +
 +{{tag>​fan curve active binding converter}}
 +
 +==== functions ====
 +  * [[:​macros:​function:​Programmer.Editor.Fixtures.Fan.SelectCurve]]
 +
 +==== affected properties ====
 +  * [[:​macros:​property:​Programmer.Editor.Fixtures.Fan.SelectedFanCurveId]]
 +
 +==== control structures ====
 +  * [[macros:​active_binding|]]
 +  * [[Math.EqualityConverter]]
 + 
 +===== Code =====
 +<code xml FanCurve.xml>​
 +<?xml version="​1.0"​ encoding="​utf-8"?>​
 +<​avolites.macros xmlns:​xsi="​http://​www.w3.org/​2001/​XMLSchema-instance"​ xsi:​noNamespaceSchemaLocation="​Avolites.Menus.xsd">​
 +  <!-- Fan curve macros. Gregory Haynes 02/01/2019 -->
 +  <macro id="​Avolites.Macros.FanCurve.Line"​ name="​Fan Curve Line">​
 +    <​description>​Set the current fan curve to Line.</​description>​
 +    <active binding="​{
 +      propertyLink id='​Programmer.Editor.Fixtures.Fan.SelectedFanCurveId' ​
 +      converter='​Math.EqualityConverter'​ converterParameter='​Line'​
 +    }"/>​
 +    <​sequence>​
 +      <​step>​Programmer.Editor.Fixtures.Fan.SelectCurve("​Line"​)</​step>​
 +    </​sequence>​
 +  </​macro>​
 +
 +  <macro id="​Avolites.Macros.FanCurve.Mirror"​ name="​Fan Curve Mirror">​
 +    <​description>​Set the current fan curve to Mirror.</​description>​
 +    <active binding="​{
 +      propertyLink id='​Programmer.Editor.Fixtures.Fan.SelectedFanCurveId' ​
 +      converter='​Math.EqualityConverter'​ converterParameter='​Mirror'​
 +    }"/>​
 +    <​sequence>​
 +      <​step>​Programmer.Editor.Fixtures.Fan.SelectCurve("​Mirror"​)</​step>​
 +    </​sequence>​
 +  </​macro>​
 +  ​
 +  <macro id="​Avolites.Macros.FanCurve.Wings"​ name="​Fan Curve Wings">​
 +    <​description>​Set the current fan curve to Wings.</​description>​
 +    <active binding="​{
 +      propertyLink id='​Programmer.Editor.Fixtures.Fan.SelectedFanCurveId' ​
 +      converter='​Math.EqualityConverter'​ converterParameter='​Wings'​
 +    }"/>​
 +    <​sequence>​
 +      <​step>​Programmer.Editor.Fixtures.Fan.SelectCurve("​Wings"​)</​step>​
 +    </​sequence>​
 +  </​macro>​
 +  ​
 +  <macro id="​Avolites.Macros.FanCurve.PullMiddle"​ name="​Fan Curve Pull Middle">​
 +    <​description>​Set the current fan curve to Pull Middle.</​description>​
 +    <active binding="​{
 +      propertyLink id='​Programmer.Editor.Fixtures.Fan.SelectedFanCurveId' ​
 +      converter='​Math.EqualityConverter'​ converterParameter='​Pull Middle'​
 +    }"/>​
 +    <​sequence>​
 +      <​step>​Programmer.Editor.Fixtures.Fan.SelectCurve("​Pull Middle"​)</​step>​
 +    </​sequence>​
 +  </​macro>​
 +  ​
 +  <macro id="​Avolites.Macros.FanCurve.PullEnds"​ name="​Fan Curve Pull Ends">​
 +    <​description>​Set the current fan curve to Pull Ends.</​description>​
 +    <active binding="​{
 +      propertyLink id='​Programmer.Editor.Fixtures.Fan.SelectedFanCurveId' ​
 +      converter='​Math.EqualityConverter'​ converterParameter='​Pull Ends'
 +    }"/>​
 +    <​sequence>​
 +      <​step>​Programmer.Editor.Fixtures.Fan.SelectCurve("​Pull Ends"​)</​step>​
 +    </​sequence>​
 +  </​macro>​
 +  ​
 +  <macro id="​Avolites.Macros.FanCurve.PullEnd"​ name="​Fan Curve Pull End">​
 +    <​description>​Set the current fan curve to Pull End.</​description>​
 +    <active binding="​{
 +      propertyLink id='​Programmer.Editor.Fixtures.Fan.SelectedFanCurveId' ​
 +      converter='​Math.EqualityConverter'​ converterParameter='​Pull End'
 +    }"/>​
 +    <​sequence>​
 +      <​step>​Programmer.Editor.Fixtures.Fan.SelectCurve("​Pull End"​)</​step>​
 +    </​sequence>​
 +  </​macro>​
 +</​avolites.macros>​
 +</​code>​
 +
 +
 +===== Explanation =====
 +
 +This explains the functional steps within the sequence. For all the other XML details please refer to [[:​macros:​formats_and_syntax#​xml_format|Formats and syntax]]
 +
 +The macros simply set the fan curve to a specific value. Each macro can be put on a button. Using [[macros:​active_binding|]] the button is highlighted if the curve is currently selected.
 +
 +===== How to use it =====
 +
 +  * [[:​macros:​deploying|make this macro available]]
 +  * copy the macros on available buttons to quickly change the fan curve.
 +
 +
 +
 +
 +~~DISCUSSION~~
macros/example/setfancurve.txt ยท Last modified: 2019/03/09 20:52 by icke_siegen