4.1. Using AQL Functions

When you load the aql32/64.xla file is loaded nothing appears on the screen; this is normal. If the file is not loaded, any worksheet formulae using AQL functions will display as #REF!. If a function is used and #VALUE! is displayed, text has probably been entered for an argument which should be a number or vice versa. If #N/A appears, one of the arguments has probably been omitted.

AQL functions are included in formulae just like ordinary Excel functions (such as sine, sum, max, etc.). If you cannot remember the order or meaning of the arguments to the function, use Excel's function wizard - the AQL functions are listed in a category called AQWA-Excel32/64.

A simple example is shown below:

=AQLposition("C:\Alpha\adtest01”, 1, z, 100)

This function returns the Z displacement at time-step 100 for structure number 1, in model adtest01, stored in directory C:\Alpha. The directory and model name (in this case "C:\Alpha\adtest01") are collectively referred to as model in the function descriptions given in Function Descriptions

To avoid typing such long formulae, use absolute and relative row and column references in Excel as much as possible. This is illustrated in the example below where you require the displacement of one structure in all six degrees of freedom for every thousand time-steps. The directory and the model name are entered into cells A1 and A2 (splitting these up makes changing to a different model easy). These items are then concatenated into a single string in cell A3. The number of the structure is entered into cell B4. The six degrees of freedom, namely X, Y, Z, RX, RY and RZ are entered into cells B5, C5, D5, E5, F5 and G5. The time-steps are entered into cells A6, A7, A8, A9, A10, A11 and A12.

The full formula for displacement in cell B6 would be:

=AQLposition("C:\Alpha\adtest01”, 1, x, 1)

Which is entered using cell references as:

=AQLposition(A3,B4,B5,A6)

This is much shorter and can be entered by clicking on the appropriate cells. However, if this formula is copied from cell B6 to cell C7, it becomes:

=AQLposition(B4,C5,C6,B7)

This is incorrect. The required formula in cell C7 is:

=AQLposition(A3,B4,C5,A7)

Column and row numbers in a formula can be made absolute by prefixing them with dollar signs. Therefore the formula in cell B6 can be rewritten as:

=AQLposition($A$3,$B$4,B$5,$A6)

Which when copied to C7 gives:

=AQLposition($A$3,$B$4,C$5,$A7)

Which, as required, evaluates to:

=AQLposition("C:\Alpha\adtest01”,1,”Y”,1000)

The use of named cells may also be helpful when requiring invariant data access. By naming cell A3 'model', use can be made of this name in the function calls and it behaves as though giving an absolute address. Thus 'model' is synonymous with $A$3.

The formula in cell B6 becomes:

=AQLposition(model,$B$4,B$5,$A6)

The formula in cell B6 can be copied over the whole of the table B6:G12 to give the required table as follows:

A: B: C: D: E: F: G:
1: C:\ALPHA\
2: ADTEST01
3: =(A1&A2)
4: Structure Number 1
5: Time-Step X Y Z RX RY RZ
6: 1 =AQLposition(model,$B$4,B$5,$A6))
7: 1000
8: 2000
9: 3000
10: 4000
11: 5000
12: 6000