Page 525 - Chief Architect Reference Manual
P. 525

Creating User Defined Macros



                               To create a Referenced Object macro     2.  In the Edit Text Macro dialog:
                               1.  Select a text object with an arrow that is   •  You can use any Named Value Pairs
                                   snapped to an object for which you       associated with the object that the
                                   would like to create a custom macro.     macro is mean to describe.
                               2.  Open the Text Macro Management dia-    •  Named Value Pairs do not require spe-
                                   log and click the New button.            cial formatting, but macros inserted
                                                                            using the %macro_name% format can-
                               3.  In the Edit Text Macro dialog:           not be used.
                                  •  You can use any Named Values associ-  •  To include a Ruby macro within
                                    ated with the object that the text arrow   another Ruby macro, use this format:
                                    is pointed to.                          macros.macro_name.
                                  •  Named Values do not require special   •  Check Evaluate and select “Materials
                                    formatting, but macros inserted using   List Line Item” from the Context drop-
                                    the %macro_name% format cannot be       down list.
                                    used.
                                  •  To include a Ruby macro within    3.  Unlike other types of macros, its validity
                                    another Ruby macro, use this format:   cannot be confirmed in the Text Macro
                                    macros.macro_name.                     Management dialog.
                                  •  Check Evaluate and select “Refer-  To use a Materials List Line Item macro
                                    enced Object” from the Context drop-  1.  Create a new or open a saved Materials
                                    down list.
                                                                           List.
                               4.  Confirm that the macro is valid by   2.  Click in a cell to select it, then click a
                                   checking its Expanded Macro Value in    second time to edit the cell and insert a
                                   the Text Macro Management dialog.
                                                                           macro.
                               To use a Referenced Object macro
                               1.  Insert the custom macros into a Text,      Contextless Macros
                                   Rich Text, Callout, or Marker object.  Select “None” as the Context for a Ruby
                               2.  Draw a Text Line with Arrow between   macro if you would prefer to define the
                                   the text object and the object that your   Context within the macro’s Value.
                                   Referenced Object macro describes.   To do this, type the Context before each
                                                                       Named Value in the macro using this format:
                               Materials List Line Item Context
                                                                       •  owner.named_value
                               A Materials List Line Item macro can be   •  referenced.named_value
                               inserted into a cell in a Materials List.
                                                                       •  line_item.named_value
                               To create a Materials List Line Item macro
                               1.  Open the Text Macro Management dia-
                                   log and click the New button.




                                                                                                       525
   520   521   522   523   524   525   526   527   528   529   530