User Tools

Site Tools


macros:example:setshapedirection

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
macros:example:setshapedirection [2019/03/09 19:09]
icke_siegen [Set Shapes (and KFS) Direction]
macros:example:setshapedirection [2019/05/03 21:35] (current)
icke_siegen
Line 25: Line 25:
    
 ===== Code ===== ===== Code =====
-<code xml>+<​code ​xml shapedirection.xml>
  
-<macro id="Avolites.Macros.ProgrammerShapes.Direction.RightToLeft" ​name="Programmer Shapes Right to Left">​ +<?xml version="1.0" ​encoding="utf-8"?
-  <description>​Select all programmer shapes and set the direction to Right to Left.</​description>​ +<avolites.macros>
-  <​sequence>​ +
-    <​step>​Editor.Shapes.ProgrammerShapesList()</​step>​ +
-    <step condition="​!Editor.Shapes.ProgrammerShapes.Empty">​Editor.Shapes.SelectAllShapes()</​step>​ +
-    <step condition="​!Editor.Shapes.EditShapesEmpty">​Editor.Shapes.SetCurrentShapesDirection("​RightToLeft"​)</​step>​ +
-  </​sequence>​ +
-</macro>+
  
-<macro id="​Avolites.Macros.ProgrammerShapes.Direction.LeftToRight" name="​Programmer Shapes Left to Right">​ +  ​<macro id="​Avolites.Macros.ProgrammerShapes.Direction.RightToLeft" name="​Programmer Shapes ​Right to Left">​ 
-  <​description>​Select all programmer shapes and set the direction to Left To Right.</​description>​ +    <​description>​Select all programmer shapes and set the direction ​to Right to Left.</​description>​ 
-  <​sequence>​ +    <​sequence>​ 
-    <​step>​Editor.Shapes.ProgrammerShapesList()</​step>​ +      <​step>​Editor.Shapes.ProgrammerShapesList()</​step>​ 
-    <step condition="​!Editor.Shapes.ProgrammerShapes.Empty">​Editor.Shapes.SelectAllShapes()</​step>​ +      <step condition="!Editor.Shapes.ProgrammerShapes.Empty">​Editor.Shapes.SelectAllShapes()</​step>​ 
-    <step condition="​!Editor.Shapes.EditShapesEmpty">​Editor.Shapes.SetCurrentShapesDirection("​LeftToRight"​)</​step>​ +      <step condition="​!Editor.Shapes.EditShapesEmpty">​Editor.Shapes.SetCurrentShapesDirection("​RightToLeft"​)</​step>​ 
-  </​sequence>​ +    </​sequence
-</​macro>​+  ​</​macro>​ 
 + 
 +  <macro id="​Avolites.Macros.ProgrammerShapes.Direction.LeftToRight"​ name="​Programmer Shapes Left to Right">​ 
 +    ​<​description>​Select all programmer shapes and set the direction to Left To Right.</​description>​ 
 +    <​sequence>​ 
 +      <​step>​Editor.Shapes.ProgrammerShapesList()</​step>​ 
 +      <step condition="​!Editor.Shapes.ProgrammerShapes.Empty">​Editor.Shapes.SelectAllShapes()</​step>​ 
 +      <step condition="​!Editor.Shapes.EditShapesEmpty">​Editor.Shapes.SetCurrentShapesDirection("​LeftToRight"​)</​step>​ 
 +    </​sequence>​ 
 +  </macro
 +   
 +</​avolites.macros>
  
 </​code>​ </​code>​
Line 58: Line 63:
 ===== How to use it ===== ===== How to use it =====
  
-Snippet only to explain ​the use of the functions.+This is an example for two shape directions - you may add more macros for other directions. Put the macros on a button to quickly set the direction you want.
  
  
 ~~DISCUSSION~~ ~~DISCUSSION~~
macros/example/setshapedirection.1552154997.txt.gz · Last modified: 2019/03/09 19:09 by icke_siegen