User Tools

Site Tools


macros:example:quickcreategroups

Differences

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

Link to this comparison view

Next revision
Previous revision
macros:example:quickcreategroups [2021/06/10 14:28] – created icke_siegenmacros:example:quickcreategroups [2021/07/22 07:22] (current) – [Quick-Create groups] icke_siegen
Line 11: Line 11:
  
 Usually when storing new groups you need to do several steps: [[macros:function:group.storegroup|store the group]] which creates it in the show library, [[macros:example:movehandle|move it]] to the location where you want it, and [[macros:function:handles.setlegend|set its legend]]. Using quickcreate you can do all in one go: create the group with the legend you want in the location you want. Usually when storing new groups you need to do several steps: [[macros:function:group.storegroup|store the group]] which creates it in the show library, [[macros:example:movehandle|move it]] to the location where you want it, and [[macros:function:handles.setlegend|set its legend]]. Using quickcreate you can do all in one go: create the group with the legend you want in the location you want.
-Also pay attention to the function [[:macros:function:Handles.CreateHandleReference]] which creates a reference to a not-yet existing handle.+Also pay attention to the function [[:macros:function:Handles.CreateHandleReference]] which creates a reference to a not-yet existing handle. on the contrary something like ''Group.QuickCreateGroup("Location=Groups,1,10", userNumber:10, "Group 10", 0)'' would throw an error and would not work as currently no handle exists with this location.
  
 ==== functions ==== ==== functions ====
Line 32: Line 32:
   <macro id="Wiki.Macros.QuickCreateGroups" name="QuickCreate Groups">   <macro id="Wiki.Macros.QuickCreateGroups" name="QuickCreate Groups">
     <sequence>     <sequence>
 +    
       <!-- Select group 1, pattern even. Save with Usernumber 10 -->       <!-- Select group 1, pattern even. Save with Usernumber 10 -->
       <step>Group.RecallGroup(userNumber: 1)</step>       <step>Group.RecallGroup(userNumber: 1)</step>
Line 53: Line 54:
 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]] 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]]
  
-tbd+  * ''Group.RecallGroup(userNumber: 1)'' selects group 1 
 +  * ''UserMacros.RecallMacroById("Avolites.Macros.PatternSelection.Odd")'' selects the odd fixtures only 
 +  * ''Group.QuickCreateGroup(Handles.CreateHandleReference("Groups", 1, 10), userNumber:10, "Group 10", 0)'' does the heavy lifting here: it creates the new group 
 +    * on button 11 on page 2 of the groups window, as denoted by ''Handles.CreateHandleReference("Groups", 1, 10)''\\ (we need to use this to create a reference to a not-yet existing handle) 
 +    * with userNumber 10 
 +    * with the legend "Group 10" 
 +    * the function also allows to set the icon if you know its Titan Id 
 +  * ''Programmer.Editor.Clear'' simply clears the selection (a quicker way would be ''Programmer.Editor.ClearAll(true, true)'' while  ''Handles.ClearSelection()'' would not work as selecting fixtures to create a group is a programmer operation)
  
 ===== How to use it ===== ===== How to use it =====
  
   - [[:macros:deploying|make this macro available]]   - [[:macros:deploying|make this macro available]]
- +  - this is probably more suitable as part of setup macros to quickly create the groups you like in a new show
-tbd +
  
 ~~DISCUSSION~~ ~~DISCUSSION~~
macros/example/quickcreategroups.1623335299.txt.gz · Last modified: 2021/06/10 14:28 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki