User Tools

Site Tools


macros:example:setfanparts

Differences

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

Link to this comparison view

macros:example:setfanparts [2019/03/09 21:23] (current)
icke_siegen created
Line 1: Line 1:
 +Example
  
 +====== Set Fan Parts ======
 +
 +^ by: | Alex del Bondio, January 2019 |
 +^ published: | http://​forum.avolites.com/​viewtopic.php?​f=20&​t=5962#​p21516 |
 +^ description:​ | Set fan parts to various values |
 +^ remarks: |  |
 +
 +{{tag>​fan parts active binding converter}}
 +
 +==== functions ====
 +  * [[:​macros:​function:​ActionScript.SetProperty]]
 +
 +==== affected properties ====
 +  * [[:​macros:​property:​Programmer.Editor.Fixtures.Fan.SegmentCount]]
 +
 +==== control structures ====
 +  * [[macros:​active_binding|]]
 +  * [[Math.EnumAsStringEqualityConverter]]
 + 
 +===== Code =====
 +<code xml FanParts.xml>​
 +<?xml version="​1.0"​ encoding="​utf-8"?>​
 +<​avolites.macros xmlns:​xsi="​http://​www.w3.org/​2001/​XMLSchema-instance"​ xsi:​noNamespaceSchemaLocation="​Avolites.Menus.xsd">​
 +
 +  <macro id="​adb.Macros.fan.1part"​ name="​adb fan 1part">​
 +    <active binding="​{
 +      propertyLink id='​Programmer.Editor.Fixtures.Fan.SegmentCount' ​
 +      converter='​Math.EnumAsStringEqualityConverter'​ converterParameter='​1'​
 +    }"/>​
 +    <​sequence>​
 +      <​step>​ActionScript.SetProperty("​Programmer.Editor.Fixtures.Fan.SegmentCount",​1)</​step>​
 +    </​sequence>​
 +  </​macro>​
 +  ​
 +  <macro id="​adb.Macros.fan.2part"​ name="​adb fan 2part">​
 +    <active binding="​{
 +      propertyLink id='​Programmer.Editor.Fixtures.Fan.SegmentCount' ​
 +      converter='​Math.EnumAsStringEqualityConverter'​ converterParameter='​2'​
 +    }"/>​
 +    <​sequence>​
 +      <​step>​ActionScript.SetProperty("​Programmer.Editor.Fixtures.Fan.SegmentCount",​2)</​step>​
 +    </​sequence>​
 +  </​macro>​
 +  ​
 +  <macro id="​adb.Macros.fan.3part"​ name="​adb fan 3part">​
 +    <active binding="​{
 +      propertyLink id='​Programmer.Editor.Fixtures.Fan.SegmentCount' ​
 +      converter='​Math.EnumAsStringEqualityConverter'​ converterParameter='​3'​
 +    }"/>​
 +    <​sequence>​
 +      <​step>​ActionScript.SetProperty("​Programmer.Editor.Fixtures.Fan.SegmentCount",​3)</​step>​
 +    </​sequence>​
 +  </​macro>​
 +  ​
 +  <macro id="​adb.Macros.fan.4part"​ name="​adb fan 4part">​
 +    <active binding="​{
 +      propertyLink id='​Programmer.Editor.Fixtures.Fan.SegmentCount' ​
 +      converter='​Math.EnumAsStringEqualityConverter'​ converterParameter='​4'​
 +    }"/>​
 +    <​sequence>​
 +      <​step>​ActionScript.SetProperty("​Programmer.Editor.Fixtures.Fan.SegmentCount",​4)</​step>​
 +    </​sequence>​
 +  </​macro>​
 +  ​
 +  <macro id="​adb.Macros.fan.6part"​ name="​adb fan 6part">​
 +    <active binding="​{
 +      propertyLink id='​Programmer.Editor.Fixtures.Fan.SegmentCount' ​
 +      converter='​Math.EnumAsStringEqualityConverter'​ converterParameter='​6'​
 +    }"/>​
 +    <​sequence>​
 +      <​step>​ActionScript.SetProperty("​Programmer.Editor.Fixtures.Fan.SegmentCount",​6)</​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 set the fan parts to various values. They also show the current value using [[macros:​active_binding|]]
 +
 +===== How to use it =====
 +
 +  * [[:​macros:​deploying|make this macro available]]
 +  * copy the macros on buttons for easy access
 +
 +
 +~~DISCUSSION~~
macros/example/setfanparts.txt ยท Last modified: 2019/03/09 21:23 by icke_siegen