Model.updateinclude#
- Model.updateinclude(id, shortname_flag, shortname, fullname_flag, fullname, parentid_flag, parentid)#
Updates include file basic information.
- Parameters:
id (unsigned int) – The ID of the include file to update. If 0, the
shortnameis used instead.shortname_flag (int) –
0 - Do not update the file short name.
1 - Update the file short name.
shortname (hwString) – The new short name if
shortname_flag=1, or the short name used to select the file if ID is 0.fullname_flag (int) –
0 - Do not update the file full name.
1 - Update the file full name.
fullname (hwString) – The new full name if
fullname_flag=1.parentid_flag (int) –
0 - Do not update the parent ID.
1 - Update the parent ID.
parentid (unsigned int) – The new parent ID if
parentid_flag=1.
Example#
Change the include file with ID 1 , stored as C:/common_files / mats / mat1.dyn from mat1.dyn to mat2.dyn and change its parent from the main file to a file with ID 3#import hm import hm.entities as ent model = hm.Model() model.updateinclude( id=1, shortname_flag=1, shortname="mat2.dyn", fullname_flag=1, fullname="C:/common_files/mats/mat2.dyn", parentid_flag=1, parentid=3, )