Model.movesubmodel#
- Model.movesubmodel(source_submodel_type, source_filename, target_submodel_type, target_filename)#
Moves a submodel or an include file to a submodel or to an include file.
- Parameters:
source_submodel_type (hwString) –
The type of entity to move:
solversubmodels: The type of source entity to move is a solver submodel entity.
includefiles: The type of source entity to move is an include file.
source_filename (hwString) – The name of the source include file or source solver submodel entity to move.
target_submodel_type (hwString) –
The type of the target entity in which the source will be moved to:
solversubmodels: The type of target entity is a solver submodel entity.
includefiles: The type of target entity is an include file.
target_filename (hwString) – The name of the new target include file or target solver submodel entity.
Example#
Move the solver submodel with name “ Part1 “ to include file with name “ EngineInclude “#import hm import hm.entities as ent model = hm.Model() model.movesubmodel( source_submodel_type="solversubmodels", source_filename="Part1", target_submodel_type="includefiles", target_filename="EngineInclude", )