Compiling a Macro

This chapter provides details on how compile a PAM, including how to set the defaults for the component parameters that you have defined in the control dialog boxes.

A compiled Parameterized Artwork Macro (AEL script) acts like any other Agilent or user-supplied PAM. At insertion, the macro creates graphics and the artwork is saved as part of the design. As with any other macro, if the original PAM is changed, each design must be revisited and the instances updated.

When a you create a PAM, you give all parameters default values. When you insert the model defined by the macro, you can accepted or modify these values to customize the specific instance.

Compile Dialog Box

The selections in this dialog box control the actual creation of the Artwork Macro (AEL script). After the macro compiles, you define the parameter defaults.

Errors are listed. Correct any errors, then recompile the macro. See the section GCC Error Messages".

Print enables you to print a copy of the contents of the Compile Messages window to use as a reference, should you need to edit the macro.

Design/Parameters displays the Design Definition dialog box. See the section Defining Component Parameter Defaults".

Defining Component Parameter Defaults

Clicking Design/Parameters in the PAM Compiler dialog box displays the same dialog box as the menu command File > Design/Parameters .

When creating a PAM, you do not need to edit entries in the General panel of this dialog box. By default, Name, and Component Instance Name are the same as the Model Name in the PAM Compiler dialog box; compiled macros are saved in the library called Compiled Artwork Macros.

Click the Parameters tab.

In the Parameters panel, the Select Parameter field displays the defined component parameters. Make sure these are what you expected to see (number, spelling, and so on).

Ensure that the Default Value for a parameter is realistic. For example, a model with a length of 0.0 mil will not appear when you insert it.

Ensure that the Parameter Type is appropriate.

The Save AEL file button saves the file with the currently defined default parameters. The file is also automatically saved when you exit the PAM Compiler.

Warning
Do not edit PAM parameters, spelling, or order in this dialog box. Edit them only through the View Controls and the control dialog boxes.
Note
For more information on using the Design Definition dialog box, refer to the Model Development manual.

Parameter Type

Use the drop-down list in this field of the Design Definitions dialog box to set the type for the selected parameter. The type of parameter selected defines the units used to display a parameter:


Parameter Type Default Layout Units
String None
Unitless None
Frequency Hertz
Resistance Ohms
Conductance Farads
Inductance Henries
Length Mils
Time Seconds
Angle Degrees
Defined in the Preferences for Layout dialog box (Options > Preferences > Units).
Caution
If a unitless parameter is defined with a Parameter Type other than Unitless, the program treats the value provided as a measure of the units selected. For example, if a Count parameter is defined with a Parameter Type as Length, when you enter what you believe to be the number of times you want the graphic repeated, the program displays the value entered as length in mils (see Missing or Incorrect Unit Designators).

Editing Component Parameters

The Select Parameter field in the Design Definitions dialog box lists the component parameters that have been defined for the model. The parameters are listed in the order in which they were compiled, which is the order in which the program looks for them when you use the macro. Because of this, if you want to add/delete parameters, you must do so only in the View Controls and the control dialog boxes, and then you must recompile the macro. Never perform any editing (Add, Cut, Paste, Copy) in the Design Definition Parameters panel.

You can add additional simulation parameters to the component parameter list. The parameter may be defined in the Edit Parameter side of the dialog. Select the last listed parameter. Fill in all the fields to define a new variable, and click the Add button. The newly defined parameter will be added after the selected one. Make sure any additional simulation parameters are only added after the list of compiled parameters. never change the order or names of the compiled parameters.

Note
See Hints and Tricks for a technique to help control the parameter order.

If the macro is re-compiled after simulation parameters have been added, they will not be lost. The system marks all the compiled parameters by prepending Generated parameter in the Parameter Description field. In this way it knows which parameters are compiled (and my be removed if they are no longer being used) and which ones were added manually and should be retained.

During a compile, the system deals with the parameters in the following manner:

  1. Saves all the previously defined parameters (compiled and simulation).
  2. Generates the list of compiled parameters for the current set of controls. If the parameter is in the saved list, copy it's Default, Type, and Description fields as saved. Remove it from the saved list.
  3. Of those parameters still in the saved list, if the Parameter Description field starts with Generated parameter it is a compiled parameter that is no longer needed. Delete it.
  4. Copy all remaining simulation parameters from the saved list adding them after the compiled parameters.

It is not an error to edit the Parameter Description field and remove the "Generated parameter" part from the description compiled parameters. All this means is that the system no longer knows the parameter was generated so that if the controls are ever modified to not use it anymore, it will not be removed from the list (it will be treated like a simulation parameter and retained).

 

Privacy Statement  | Terms of Use  | Legal | Contact Us  | © Agilent 2000-2008 

Contents
Additional Resources