Model.updateincludedata2#
- Model.updateincludedata2(id, shortname, do_not_export_flag, do_not_export, solver1_flag, solver1, solver2_flag, solver2, merge_flag, merge)#
Updates include file solver specific information.
The two solver values are for the convenience of template authors. They function in a manner analogous to config and type for elements, in that they can be used to screen out categories of include files from inappropriate sections in the template.
As an example, in , there are three sections in the output file: A, B, and C. Some include files need to appear in the A section, others in the B section, and the rest in the C section. In this case, solver1 is used to segregate them, with A files having the value 1, B files having the value 2, and C files having the value 3.
- Parameters:
id (unsigned int) – The ID of the include file to update. If 0,
shortnameis used instead.shortname (hwString) – The short name used to select the file if
IDis 0. Ignored otherwise.do_not_export_flag (int) –
0 - Do not update the export state.
1 - Update the export state.
do_not_export (int) –
0 - Set the include to export.
1 - Set the include to not export.
solver1_flag (int) –
0 - Do not update solver value 1.
1 - Update solver value 1.
solver1 (int) – The new value of solver value 1.
solver2_flag (int) –
0 - Do not update solver value 2.
1 - Update solver value 2.
solver2 (int) – The new value of solver value 2.
merge_flag (int) –
0 - Do not update the merge value.
1 - Update the merge value.
merge (int) –
0 - Do not merge the include file with the main file.
1 - Merge the include file with the main file.
This option is valid if you have selected the ‘Preserve Merge’ export option.
Example#
Change the include file with ID 1 to not export and update solver1 to a value of 3#import hm import hm.entities as ent model = hm.Model() model.updateincludedata2( id=1, shortname="", do_not_export_flag=1, do_not_export=0, solver1_flag=1, solver1=3, solver2_flag=0, solver2=0, merge_flag=0, merge=0, )