*feinputwithdata2

Reads data from sources such as CAD files, connector files/MCF/MWF, and FE files, with additional input parameters.

Syntax

*feinputwithdata2 import_reader filename overwrite_flag reserved1 cleanup_tolerance blanked_component offset_flag string_array number_of_strings scale_factor name_comps_by_layer

Type

HyperMesh Tcl Modify Command

Description

This command inputs data from sources such as CAD files, connector files/MCF/MWF, and FE files, with additional input parameters.

The additional input parameters are defined using the *createstringarray command and the string_array and number_of_strings options. 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 command, it is best to first perform the import action using the HyperMesh workspace, and then look at the values written to the command file.

Inputs

import_reader
The full path and filename of the import reader program. This can indicate a CAD reader, Connector/MCF/MWF reader, or FE reader. Paths with spaces must be enclosed in quotes. Core HyperMesh readers also support a short name, instead of the full path and filename.
filename
The full path and filename of the import file. Paths with spaces must be enclosed in quotes.
overwrite_flag
Flag indicating whether HyperMesh should offset or overwrite any existing entity IDs. This option is only valid for FE files. For CAD files and connector files/MCF/MWF, this value should always be 0.
  • 0 - Offset any existing entity IDs.
  • 1 - Overwrites any existing entity IDs. Also see the offset_flag option.
reserved1
Not used. Always set to 0.
cleanup_tolerance
A real number indicating the cleanup tolerance to use during geometry import to clean the topology.
  • > 0 - Use this value as the cleanup tolerance.
  • = 0 - Do not cleanup topology.
  • < 0 - Use the automatic cleanup tolerance.
blanked_component
Flag indicating whether to create a blanked component for relevant data. This is only valid for IGES and CATIA files.
offset_flag
If overwrite_flag is set to 1, use:
  • 0 - For the next available entity IDs.
  • 1 - To apply a user-defined offset.
If the flag is set to 1, the entity offsets must be defined for each relevant entity using the *feinputoffsetid command. This command must be run before each import, if an offset is required as the offset values only apply to the next file import.
string_array
The string array ID that contains the additional input parameters. The string array is created using the *createstringarray command. This should always be set to 1.
number_of_strings
Integer indicating the size (number of strings) in the string array created using *createstringarray.
scale_factor
Real value indicating the scale factor to apply to the data (CAD import only). Set to 1.0 when not being used.
name_comps_by_layer
Flag indicating whether to name CATIA components.
  • 1 - With the layer as part of the name.
  • 0 - Without the layer as part of the name.

Example

To import an Abaqus file named C:/model.inp, offset any existing IDs using the next available IDs, and skip reading any loads or loadcols from the file:
*createstringarray 2 "LOADS_SKIP " "LOADCOLS_SKIP "
*feinputwithdata2 "#abaqus/abaqus" "C:/model.inp" 0 0 0 0 0 1 2 1 0
To read a UG input file named ug_part.prt with parameters setup from the UG Part browser:
*createstringarray 12 "SELECTIONS 0 1 0 0 0 1 0 0 0" "" "BEGIN_PARTS" "END_PARTS" "" "BEGIN_LAYERINFO" "DISABLE  " "ENABLE  *" "END_LAYERINFO" "" "COMPONENT_NAME default"
*feinputwithdata2 "#ug/ug" "ug_part.prt" 1 0 -0.01 1 0 1 12 1 0
To import connectors using a MCF/MWF:
*createstringarray 1 "~HM_MAX_CE_ID [hm_entitymaxid CONNECTORS]"
*feinputwithdata2 "#connectors/connectors" "C:/example1.mwf" 0 0 0 1 0 1 1 1 0
To import connectors using a MCF/MWF with the optional ID map file:
*createstringarray 2 "~HM_MAX_CE_ID [hm_entitymaxid CONNECTORS]" "~CHARTFILE C:/id_map_file.txt"
*feinputwithdata2 "#connectors/connectors" "C:/example2.mwf" 0 0 0 1 0 1 2 1 0

Errors

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}