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.

- Output File Name is the name of the file that will contain the compiled macro. Default = < current design name >_art.ael
- Model Name is the name of the component created by the compiled macro. Default = < current design name >
- Default returns both the output file name and the model name to that of the current design.
- Browse opens a standard file browser.
- Save Design functions the same as the File > Save command. If the design has not been previously saved, the Save As dialog box opens so you can enter a name and save the design. If the design has already been save, it is resaved to the same name.

Note
The compile function acts on a design as it is currently displayed, not on the design as it was last saved. If you forget to save a design before you compile the macro, the compiled macro will include any recent edits but may not match the saved design. It is good practice to always click Save Design before you compile.
Compile starts compiling the macro.
The Compile Messages window displays running messages as the macro compiles. Model parameters are listed. Check them to ensure that all of the parameters you expected have been created, and that they are spelled correctly.
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:
- Saves all the previously defined parameters (compiled and simulation).
- 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.
- 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.
- 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 ![]()