User Tools

Site Tools


macros:example:setallshapesdirection

Example

Set All Shapes Direction

by: Sebastian Beutel, June 2021
published: here
description: Set the direction of all running shapes
remarks:

This is a combination of Select all running shapes and Shapes - Shape Direction, 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

affected properties

control structures

specials

The file with all macros for all possible directions is available here as allshapesdirection.xml.

Code

allshapesdirection_short.xml
<?xml version="1.0" encoding="utf-8"?>
<avolites.macros>
 
  <macro id="Wiki.Macros.SelectAllShapes" name="Select All Shapes">
    <sequence>
      <step>Editor.Shapes.ConnectShapesList()</step>
      <step condition="!Editor.Shapes.ProgrammerShapes.Empty">Editor.Shapes.SelectAllShapes()</step>
      <step condition="!Editor.Shapes.EditShapesEmpty">ActionScript.SetProperty.Boolean("Editor.Shapes.EditingPlaybackShapes", true)</step>
    </sequence>
  </macro>
 
  <macro id="Wiki.Macros.AllShapes.Direction.LeftToRight" name="All Shapes Direction LeftToRight">
    <sequence>
      <step>UserMacros.RecallMacroById("Wiki.Macros.SelectAllShapes")</step>
      <step>Editor.Shapes.SetCurrentShapesDirection("LeftToRight")</step>
    </sequence>
  </macro>
 
  <macro id="Wiki.Macros.AllShapes.Direction.TopDown" name="All Shapes Direction TopDown">
    <sequence>
      <step>UserMacros.RecallMacroById("Wiki.Macros.SelectAllShapes")</step>
      <step>Editor.Shapes.SetCurrentShapesDirection("TopDown")</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 file contains of a number of macros.

  • the first macro Select All Shapes is described in Select all running shapes. 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 Shapes - Shape Direction

How to use it

  1. program and fire some playbacks with shapes
  2. fire one of the macros “All Shapes Direction …” to change the direction of all running shapes at once
You could leave a comment if you were logged in.
macros/example/setallshapesdirection.txt · Last modified: 2021/07/22 13:38 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki