This spreadsheet is used to perform simple extraction of results, and nothing more (except that modification of coordinate systems is also possible). Several ComboBoxes are used to define the parameters for the extraction:
Selection of the name of the group from which the results are to be extracted.
Selection of the load case name.
Selection of the sub-case name.
Selection of the result type name.
Selection of the “location” parameter, for example “Nodes”, “Elements” or “ElemCenters”. Together with the group name, this parameter determines the element and node entities for which the results are extracted.
The coordinate system in which the result components are to be extracted. This is the only parameter that corresponds to a post-processing calculation performed on the result.
A checkbox allows the user to specify whether the data are recovered in a projected coordinate system (when applicable). Three real values then specify the components of this coordinate system, expressed in the selected coordinate system.
It is possible to select the layers for which results will be extracted (when applicable). The choice is between “all layers” (no layer selection) and a range address. The range corresponds to a selection of cells specifying the layers.
When all the parameters have been defined, the “Extract” button performs the extraction and fills cells in the spreadsheet starting at line 15. More precisely, the following operations are performed in the corresponding VBA subroutine:
The current NastranDb database is retrieved using the “getDb” method of the FemDbIds spreadsheet.
The names of the selected load case, sub-case and result type are used to import results into the current database. (The XDB file name was selected in the “FemDbIds” spreadsheet.)
The group corresponding to the selected group name is retrieved from the current database (using the “getGroupCopy” method of the “NastranDb” class).
This group, the selected location, and the names of the load case, sub-case and result type are used to retrieve a result from the database using the “getResultCopy” method.
The results stored in the database are removed by calling the “removeAllResults” method.
If necessary, the components of the result are expressed in a new coordinate system by calling “modifyRefCoordSys” of the “Result” class.
The previous results are erased.
The data are extracted from the result and pasted into the spreadsheet, starting at line 16.
A title line is added at line 15.
At various steps, an error message is defined. This message is printed at line 15 of the spreadsheet if an error occurs during execution. In most cases, this error is related to inconsistencies in the data definition, and the message should help the user correct their data.
Note that this spreadsheet works for both real and complex results.