<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<!--
Copyright (c) 2006 UGS Corp.

All Rights Reserved.

This software and related documentation are proprietary to UGS Corp.
-->
<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <title>Macro File Syntax</title>
      <script language="javaScript">
        abridged="false";
        displayConditions=new Array();
      </script>
      <link type="text/css" href="../css/main_styles.css" rel="stylesheet">
   </head>
   <body class="bodydocs" onload="top.pageLoader()" bgcolor="#FFFFFF">
      <div class="title_topic3" id="xps10_pagetitle">Macro File Syntax</div>
      <hr noshade="true">
      <div class="title_division">Macro Text Files</div>
      <p class="para_division">When you record a macro, a text file with a &quot;.macro&quot; extension is created. If you open this text file with an editor, you will see that the file consists of a number of header lines, followed by lines of statements that consist of unique keywords, data, and comments.</p>
      <p class="para_division">The standard header of the macro text file consists of the items shown below in the following order:</p>
      <ul>
         <li>
            <p class="para_item">The NX version.</p>
         </li>
         <li>
            <p class="para_item">The macro revision.</p>
         </li>
         <li>
            <p class="para_item">The graphics driver type.</p>
         </li>
         <li>
            <p class="para_item">The name of the macro creator, along with the time and date of creation.</p>
         </li>
         <li>
            <p class="para_item">A list of the input devices associated with NX. This includes the Spaceball or SpaceMouse. Otherwise, it indicates &quot;None&quot;.</p>
         </li>
         <li>
            <p class="para_item">The NX selection parameters.</p>
         </li>
         <li>
            <p class="para_item">The NX display parameters.</p>
         </li>
         <li>
            <p class="para_item">A row of asterisks indicating the end of the header.</p>
         </li>
      </ul>
      <p class="para_division">It is strongly recommended that you not modify these header lines. You can, however, add new lines of information to the header. For example, you may find it useful to add a line of text that describes the use of the macro. These lines should be added above the row of asterisks.</p>
      <p class="para_division">Following is an example of a macro file header:</p>
      <p class="para_division"> Unigraphics V15.0 Macro File: /users/fred/cube.macro Macro Version 4.2 Graphics Driver: XWI Created by fred on Fri Sep 11 17:53:30 1998 Devices: None Selection Parameters 0 2 0.250000 Display Parameters 1.000000 9.064538 4.507874 -7983.606557 -6278.767123 7983.606557 6278.767123 &lt;Add your comments here.&gt; *****************</p>
      <div class="title_division">Macro File Indentation</div>
      <p class="para_division">The indentation of macro statements indicates the nesting level of the dialogs in the interface. No indenting takes place until a dialog is displayed in dialog area 1. </p>
      <p class="para_division">The following example illustrates macro file indentation. The statement, DIALOG_BEGIN &quot;Create Blend&quot; indicates the display of a new dialog. Activity that can be recorded within this dialog is indented. The line DIALOG_END -2, 0 ! Create Blend : OK indicates that the dialog was terminated when the OK button was selected. Indentation reverts to what it was.</p><pre class="indent">BEG_ITEM 1 (1 STRN) = &quot;.25&quot; ! Default Radius BEG_ITEM 2 (1 OPTM) = 0 ! Edge Blend BEG_ITEM 4 (1 BOOL) = 0 ! Blend All Instances BEG_ITEM 7 (0 STRN) = &quot;.25&quot; ! Radius at Point BEG_ITEM 9 (0 STRN) = &quot;0.001&quot; ! VRB Tolerance BEG_ITEM 11 (1 BOOL) = 0 ! Add Tangent Edges BEG_ITEM 12 (1 OPTM) = 0 ! All types BEG_ITEM 14 (1 BOOL) = 0 ! Use Overflow Options END_ITEM 1 (1 STRN) = &quot;.25&quot; ! Default Radius END_ITEM 2 (1 OPTM) = 0 ! Edge Blend END_ITEM 4 (1 BOOL) = 0 ! Blend All Instances END_ITEM 7 (0 STRN) = &quot;.25&quot; ! Radius at Point END_ITEM 9 (0 STRN) = &quot;0.001&quot; ! VRB Tolerance END_ITEM 11 (1 BOOL) = 0 ! Add Tangent Edges END_ITEM 12 (1 OPTM) = 0 ! All types END_ITEM 14 (1 BOOL) = 0 ! Use Overflow Options DIALOG_END -2, 0 ! Create Blend: OK</pre><p class="para_division">Snapshots are an overall recording of the contents of a dialog, item by item. Snapshots of a dialog are required at key locations such as the creation of the dialog. This allows macros to stay in sync with NX during the playback of a file. As an example, the simple selection of a button in a dialog may cause certain activity in NX. However, this activity may be partially based on the state of other toggle buttons in the dialog. If these toggle buttons are not set correctly, NX may behave differently during the playback of the macro. Therefore, there are key points, when the entire state of the dialog is recorded.</p>
      <p class="para_division">Snapshots are recorded in the macro with the &quot;xxx_ITEM&quot; macro lines. In the example above, the BEG_ITEM lines reflect the contents of the dialog when it is newly created. The END_ITEM lines indicate the contents of the dialog just prior to termination. Other locations for snapshots include selecting the Apply Button (APP_ITEM) and user entry (USE_ITEM) which is a snapshot of the dialog at the start of a user entry point. Comments are provided as often as possible to indicate the individual items in the dialog.</p>
   </body>
</html>