Model.createentitiesfromsource#

Model.createentitiesfromsource(entity_type='', source='', sourcecollection=Collection(), matcardimage='', propertyoncomponent='1', forceupdate='0', beamsection=Entity(), databasename='', entitynamelist='', units='')#

Creates entities using an external source file.

Parameters:
  • entity_type (hwString) – The type of entity to create.

  • source (hwString) – The path and file name to the source file.

  • sourcecollection (Collection) – The collection containing the source entities.

  • matcardimage (hwString) – Reserved for future development.

  • propertyoncomponent (hwString) – Reserved for future development.

  • forceupdate (hwString) – Reserved for future development.

  • beamsection (Entity) – Reserved for future development.

  • databasename (hwString) – Reserved for future development.

  • entitynamelist (hwString) – Reserved for future development.

  • units (hwString) – Reserved for future development.

Examples#

Create beam sections entities use a * .csv * file#
import hm
import hm.entities as ent

model = hm.Model()

# Create beam sections using a csv file
model.createentitiesfromsource(
    entitytype='beamsects', source="C:/temp/beam_section.csv"
)
Create desingpoint entities use an * .xml * file#
import hm
import hm.entities as ent

model = hm.Model()

# Create beam sections using an xml file
model.createentitiesfromsource(
    entitytype='designpoint', source="C:/temp/designpoint_file.xml"
)