Model.feoutputwithdata_PI#

Model.feoutputwithdata_PI(export_template, filename, reserved1, reserved2, export_type, string_array)#

Exports an ASCII analysis file, formatted based on the specified export_template. Currently supported for OptiStruct only.

The additional output parameters are defined using the string_array option. For a list of strings that are supported by each reader, refer to the See Also list.

To determine the proper options and strings to use for this function, it is best to first perform the import action using the HyperMesh workspace and then look at the values written to the command file.

Parameters:
  • export_template (hwString) – The full path and filename of the export template to be used. Paths with spaces must be enclosed in quotes.

  • filename (hwString) – The full path and filename of the output file. Paths with spaces must be enclosed in quotes.

  • reserved1 (int) – Reserved for future development. Must be set to 0.

  • reserved2 (int) – Reserved for future development. Must be set to 0.

  • export_type (int) –

    Flag indicating which entities will be output:

    0 - Only the displayed entities will be output.

    1 - All entities will be output.

    2 - Entities will be output based on their/their parent collector’s output bit custom output). This bit can be set using the Model.allsuppressoutput(), Model.includesuppressoutput() and setvaluefunctions() or using the Entity State Browser.

  • string_array (hwStringList) – The string array that contains the additional output parameters.

Examples#

Export all entities use the OptiStruct template , to a file named “ C:/model.fem “#
import hm
import hm.entities as ent

model = hm.Model()

model.feoutputwithdata_PI(
  export_template="C:/Altair/2025.1/hwdesktop/templates/optistruct/",
  filename="C:/model.fem",
  reserved1=0,
  reserved2=0,
  export_type=1,
  string_array=list())
Export all entities using the OptiStruct template, to a file named C:/model.fem, skipping connector data#
import hm
import hm.entities as ent

model = hm.Model()

model.feoutputwithdata_PI(
  export_template="C:/Altair/2025.1/hwdesktop/templates/optistruct/",
  filename="C:/model.fem",
  reserved1=0,
  reserved2=0,
  export_type=1,
  string_array=["CONNECTORS_SKIP"])