It is possible to extract the table of contents of the data at once.
Returns the hierarchical tables of contents (Subcases, Types, Requests, Components) of the specified data file.
filename |
Fully qualified name of the data file. |
|||||
t |
A table containing the information in the hierarchical structure as shown below. |
|||||
|
t |
|
||||
|--- |
Subcases(an array of tables) |
|
|
|||
|
|------ |
Types(an array of tables) |
|
|
||
|
| |
|------ |
Reqs(an array of tables) |
|
||
|
| |
| |
|---------- |
Comps(an array of tables) |
||
|
| |
| |
| |
|------ |
Name (Comp name) |
|
|
| |
| |
| |
|------ |
Total (# of Comps) |
|
|
| |
| |
|---------- |
Name (Req name) |
|
|
|
| |
| |
|---------- |
Total (# of Reqs) |
||
|
| |
|------ |
Name (Type name) |
|
||
|
| |
|------ |
Total (# of Types) |
|
||
|
|------ |
Name(Subcase name) |
|
|
||
|
|------ |
Total (# of Subcases) |
|
|
||
ExampleThe following shows how to query data for its table of contents and access selected fields. t = ReadFileToc ("c:/test.dat"); // get the total number of Subcases n = t.Subcases.Total; // get the name of first Component in the hierarchy name = t.Subcases[1].Types[1].Reqs[1].Comps[1].Name; // get the name of the second Subcase name = t.Subcases[2]. Name; |