*removesubmodel

Deletes a solversubmodel or include file, optionally removing all of its contents as well.

Syntax

*removesubmodel submodel_type id shortname remove

Type

HyperMesh Tcl Modify

Description

Deletes a solversubmodel or include file, optionally removing all of its contents as well.

If both id and shortname are empty, this command removes all solversubmodels and include files from the database (but does not delete the contents). If the contents are not deleted, they move to the parent include file.

Inputs

submodel_type
Use solversubmodel to remove a solver submodel or includefile to remove an include file.
id
The entity ID, or 0 to use shortname.
shortname
The short name of the solver submodel or include file. This can be empty if id is specified other than 0.
remove
0 - Do nore remove the contents of the object when deleting.
1 - If either id or shortname selects a single object, then all of the contents of that object will be deleted from the database.

Examples

To remove the solversubmodel entity with ID 10 and delete its contents:

*removesubmodel solversubmodels 10 "" 1

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

2019