Page 524 - Chief Architect Reference Manual
P. 524

Chief Architect X10 Reference Manual



                           They do not, however, use regular text. In   Owner Object Context
                           order to function, the information in each
                           Ruby macro must have a defined Con-  A Ruby macro can be assigned the Owner
                           text: Owner Object, Referenced Object,   Object context, which means it is to be used
                           Materials List Line Item, or None.   in object labels.
                                                                To create an Owner Object macro
                           Non-Evaluated Text Macros
                                                                1.  Select an object for which you would
                        Non-evaluated text macros primarily act as   like to create a custom macro for its
                        shortcuts for strings of text that you use often   label.
                        in your work. They are dynamic, so if you   2.  With the object selected, open the Text
                        need to modify a string, you can simply edit   Macro Management dialog and click
                        the associated macro instead of locating and   the New button.
                        changing every instance of the text in the
                        plan or layout file.                    3.  In the Edit Text Macro dialog:
                                                                   •  You can use any Named Values associ-
                        Text macros may include Global macros,       ated with the selected object in the
                        which insert dynamic information about       macro. See “Working with Named Val-
                        general conditions in a view or file but are   ues” on page 1347.
                        not associated with a particular object.
                                                                   •  Named Values do not require special
                        To create a non-evaluated text macros        formatting, but macros inserted using
                                                                     the %macro_name% format cannot be
                        1.  Open the Text Macro Management dia-      used.
                            log and click the New button.
                                                                   •  To include a Ruby macro within
                        2.  In the Edit Text Macro dialog:           another Ruby macro, use this format:
                           •  Type the desired text.                 macros.macro_name.
                           •  Insert any Global text macros that you   •  Check Evaluate and select “Owner
                             need. Some User Defined macros can      Object” from the Context drop-down
                             also be used.                           list.
                           •  Inserted macros should use the format:   4.  Confirm that the macro is valid by
                             %macro_name%.                         checking its Expanded Macro Value in
                           •  Leave the Evaluate check box         the Text Macro Management dialog.
                             unchecked.
                                                                The resulting macro can be inserted into the
                        3.  Confirm that the macro is valid by   label for any object for which it is Valid.
                            checking its Expanded Macro Value in
                            the Text Macro Management dialog.      Referenced Object Context
                        The resulting macro can be inserted into a   When a Ruby macro is assigned the
                        text object. Although it cannot not display   Referenced Object context, it can be inserted
                        dynamic information about a particular   into text with an arrow pointing to the object
                        object, it can also be inserted into an object   it refers to.
                        label



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