Example ====== Set All Shapes Direction ====== ^ by: | Sebastian Beutel, June 2021 | ^ published: | here | ^ description: | Set the direction of all running shapes | ^ remarks: | | {{tag>shapes direction select recall macro}} This is a combination of [[macros:example:selectallrunningshapes|]] and [[macros:example:shapedirection|]], to set all running shapes' direction at once. The file consists of a number of macros. The first one selects all running shapes. The other macros recall the first one, and then set the direction to the various possible values, ==== functions ==== * [[:macros:function:Editor.Shapes.ConnectShapesList]] * [[:macros:function:Editor.Shapes.SelectAllShapes]] * [[:macros:function:ActionScript.SetProperty.Boolean]] * [[:macros:function:UserMacros.RecallMacroById]] * [[:macros:function:Editor.Shapes.SetCurrentShapesDirection]] ==== affected properties ==== * [[:macros:property:Editor.Shapes.ProgrammerShapes.Empty]] * [[:macros:property:Editor.Shapes.EditShapesEmpty]] * [[:macros:property:Editor.Shapes.EditingPlaybackShapes]] ==== control structures ==== * [[macros:control_structures|step condition]] ==== specials ==== * [[macros:syntax:referingmacros|refering macros]] The file with all macros for all possible directions is available {{ :macros:example:allshapesdirection.xml |here as allshapesdirection.xml}}. ===== Code ===== Editor.Shapes.ConnectShapesList() Editor.Shapes.SelectAllShapes() ActionScript.SetProperty.Boolean("Editor.Shapes.EditingPlaybackShapes", true) UserMacros.RecallMacroById("Wiki.Macros.SelectAllShapes") Editor.Shapes.SetCurrentShapesDirection("LeftToRight") UserMacros.RecallMacroById("Wiki.Macros.SelectAllShapes") Editor.Shapes.SetCurrentShapesDirection("TopDown") ===== 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 file contains of a number of macros. * the first macro ''Select All Shapes'' is described in [[macros:example:selectallrunningshapes|]]. It is used in all subsequent macros. * the other macros recall the first macro using ''UserMacros.RecallMacroById'', and then set the direction as explained in [[macros:example:shapedirection|]] ===== How to use it ===== - [[:macros:deploying|make this macro available]] - program and fire some playbacks with shapes - fire one of the macros "All Shapes Direction ..." to change the direction of all running shapes at once ~~DISCUSSION~~