Model.importbom#
- Model.importbom(file_name, options)#
Imports a UDMXML BOM file into a given part.
- Parameters:
file_name (hwString) – The name and path of the file to read.
options (hwString) –
The string containing all the <option>=<value> pairs.
importoption=<value>
The import option as child, replace or merge.
overwriteattribs=<value>
Valid when importoption=merge.
0 - Do not overwrite attributes.
1 - Overwrite attributes.
subsystem=<value>
0 - Do not import subsystem structure.
1 - Import subsystem structure.
target_part_hmid=<value>
The part ID to be used as root for importing when
"importoption=child". If not specified,"target_part_udmid"is used.target_part_udmid=<value>
If
"target_part_hmid"is not provided, this is the UDMID of the part to be used as root for importing when"importoption=child".
Example#
Import UDMXML BOM under UDM part ID $ udmid from file “ C:/temp / exportedbom.xml “#import hm import hm.entities as ent model = hm.Model() model.importbom( file_name="C:/temp/exportedbom.xml", options="importoption=child overwriteattribs=1 target_part_udmid=$udmid", )