Use Inquire Paths to Ancestors to inquire the ancestral paths of a specified structure. A path of ancestors of a structure S is a list of ordered pairs: ((A1,E1),(A2,E2),...,(Am,Em 41;, (S,0)) where each ordered pair consists of an identifier of a structure (Ax) that is an ancestor of the specified structure (S) and the position of an execute structure-type element (Ex) that references the next structure in the path. Ancestor structure A1 is the top of the path (i.e., it is not referenced by any other structure) and S is the bottom of the path.
The path order and path depth determine the portion of each path to be returned. Your application may specify the path order as TOP FIRST or BOTTOM FIRST. The path depth determines the maximum number of ordered pairs returned in any one path. Specifying a path depth of zero returns each path in its entirety. When truncation occurs, the path order determines whether the graPHIGS API returns the head or tail portion of the path. This truncation may result in two or more portions of paths having the same set of element references. The graPHIGS API returns only one such portion so that all of the returned path portions are distinct.
If the information is available, then the graPHIGS API sets the error indicator to zero and returns the values in the output parameters. If the information is unavailable, then the values returned in the output parameters are unpredictable and the graPHIGS API sets the error indicator to one of the following errors:
|pinq_paths_ances (struct_id, order, depth, store, err_ind, paths)|
|PQPAN (strid, pthord, pthdep, ipthsz, n, errind, ol, apthsz, paths)|