Example ====== Programmer - Fan Curves ====== ^ by: | Alex del Bondio with the help of Greg Haynes | ^ published: | January 2019 | ^ description: | Changes fan curves, grouping and parts | ^ remarks: | | {{ :macros:example:adb_fancurves.xml }} {{tag> fan curve group segment part }} This selection of macros lets you change the fan curve, parts and grouping options without having to enter the fan menu. These macros have [[:macros:active_binding]] set so they will highlight when the corresponding attribute is set. 5/1/19 Fan Toggle macro added in the file The code below is a snippet of the whole file which contains macros for all curves, grouping options and a handful of segments/parts. ==== functions ==== * [[:macros:function:Programmer.Editor.Fixtures.Fan.SelectCurve]] ==== affected properties ==== * [[:macros:property:Programmer.Editor.Fixtures.Fan.SelectedFanCurveId]] * [[:macros:property:Programmer.Editor.Fixtures.Fan.GroupOptions]] * [[:macros:property:Programmer.Editor.Fixtures.Fan.SegmentCount]] ==== specials ==== * [[:macros:active_binding]] ===== Code ===== Programmer.Editor.Fixtures.Fan.SelectCurve("Line") ActionScript.SetProperty.Enum("Programmer.Editor.Fixtures.Fan.GroupOptions", "FanWithinGroup") ActionScript.SetProperty("Programmer.Editor.Fixtures.Fan.SegmentCount",3) ===== 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]] * ''Programmer.Editor.Fixtures.Fan.SelectCurve("Line")'' sets the ''SelectedFanCurveId'' to "Line" * ''Programmer.Editor.Fixtures.Fan.GroupOptions'' is the property regarding the grouping options and needs to be set via ''ActionScript.SetProperty.Enum'' * ''Programmer.Editor.Fixtures.Fan.SegmentCount'' the number of parts the fan is split into and again needs to be set via ''ActionScript.SetProperty'' * ''active binding'' is used to highlight a macro when the corresponding property (''propertyLink id'') matches the ''converterParameter''. A good starting point to understand active binding is either this wiki or this post in the Avo forum [[http://forum.avolites.com/viewtopic.php?f=20&t=5962]] ===== How to use it ===== * [[:macros:deploying|make this macro available]] ~~DISCUSSION~~