hm_getincludechildren

Returns a list of children include IDs or names either directly or using recursion.

Syntax

hm_getincludechildren parent list_type recursive ?search_type?

Type

HyperMesh Tcl Query

Description

Returns a list of children include IDs or names either directly or using recursion.

Inputs

parent
The include to consider as the parent for returning the children includes. A value of 0 indicates that the "master model" will be used as the parent.
The optional -byshortname and -byfullname arguments define how the parent is specified. Only one argument may be specified at a time. If no argument is specified, the parent is assumed to be specified by ID.
list_type
The type of include list to return. Valid values are:
id - Return the list of includes using IDs
shortname - Return the list of includes using short names.
fullname - Return the list of includes using full names.
resursive
A flag to indicate whether the returned list is recursive or not. Valid values are:
0 - No recursion. Only direct children are returned.
1 - Recursion. All children of the parent are returned.
?search_type?
By default, HyperMesh searches for the include using the short name. This option allows you to specify how the search for the include should be conducted. Valid values are:
-byshortname - The include is specified using the short name.
-byfullname - The include is specified using the full name.

Examples

To get the list of all children include IDs for include ID 2:

hm_getincludechildren 2 id 1

To get the list of direct children include shortnames for include full name C:/temp/my_include.txt:

hm_getincludechildren C:/temp/my_include.txt shortname 0 -byfullname

Errors

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}

Version History

10-SA1-120