Model.tableexport#

Model.tableexport(name, filename, delimiter)#

Exports data from a table to a file.

Parameters:
  • name (hwString) – The name of the table to export.

  • filename (hwString) – The full path and filename of the file to write.

  • delimiter (hwString) – The character or string to use as the delimiter. The value must be enclosed in quotes. If not specified, the default is a comma (CSV).

Examples#

Write out “ table1 “ with commas as the separator#
import hm
import hm.entities as ent

model = hm.Model()

model.tableexport(name="table1", filename="C:/table1.txt", delimiter=",")
Write out “ table1 “ with commas as the separator ( Alternatively )#
import hm
import hm.entities as ent

model = hm.Model()

model.tableexport(name="table1", filename="C:/table1.txt",delimiter="")
Write out “ table1 “ with “ ABC “ as the separator .#
import hm
import hm.entities as ent

model = hm.Model()

model.tableexport(name="table1", filename="C:/table1.txt", delimiter="ABC")