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 revisionPrevious revision
macros:example:setshapedirection [2019/03/09 18:09] – [Set Shapes (and KFS) Direction] icke_siegenmacros:example:setshapedirection [2019/05/03 19:35] (current) icke_siegen
Line 25: Line 25:
    
 ===== Code ===== ===== Code =====
-<code xml>+<code xml shapedirection.xml>
  
-<macro id="Avolites.Macros.ProgrammerShapes.Direction.RightToLeftname="Programmer Shapes Right to Left"> +<?xml version="1.0encoding="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 18:09 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki