Skip to main content

optiSLang 3D Postprocessing Script API 2025 R1

ImportItemInfo Struct Reference

Last update: 16.07.2025

defines a data item which was found in an input file More...

Public Types

enum  enum_format_type {
  NO_FILE = 0, LSDYNA, NASTRAN, NASTRAN_DATA,
  IMAGE, PERMAS, STL, SRB_NODE_DATA,
  CSV_ELEMENT_DATA, CSV_NODE_DATA, CSV_SIGNAL_DATA, ABAQUS,
  CSV_GRID2D, CSV_GRID3D, LSDYNA_LSPREPOST, VTK,
  ANSYS_RST, ANSYS_APDL, CSV_FLUENT, CSV_SIGNAL_MESH
}
 defines the format of a file More...
 
enum  Type {
  MESH = 0, ELEMENT, NODE, INTPT,
  SCALAR, NODE_COOR_X, NODE_COOR_Y, NODE_COOR_Z,
  NODE_COOR_DEVIATION_X, NODE_COOR_DEVIATION_Y, NODE_COOR_DEVIATION_Z, NODE_COOR_DEVIATION_NORM
}
 defines the type of data item More...
 

Public Member Functions

 ImportItemInfo (string par_filename, enum_format_type par_file_format, Type par_data_type, number par_column, string par_input_ident, string par_imported_ident="", MetaStructure par_mesh_info=MetaStructure(), bool par_do_import=true)
 constructor More...
 
 ImportItemInfo (ImportItemInfo other)
 copy constructor More...
 
 ImportItemInfo ()
 Default constructor. More...
 
ImportItemInfo operator= (ImportItemInfo other)
 copy-assign operator More...
 

Static Public Member Functions

static dataobject_types objectType (ImportItemInfo::Type type)
 
static string toScript (ImportItemInfo::enum_format_type type)
 
static string toScript (ImportItemInfo::Type type)
 
static string toString (ImportItemInfo::enum_format_type type)
 
static string toString (ImportItemInfo::Type type)
 

Public Attributes

number column
 if it is a data object, then this defines the column in the data matrix (0..n-1)
 
Type data_type
 the kind of data
 
bool do_import
 defines if this data item is to be imported. may be changed by the user. if the data type is a "mesh" then it cannot be "disabled"
 
enum_format_type file_format
 the source file format
 
string filename
 the name of the source file relative to the base path
 
 immutable
 
string imported_ident
 the ident of the data item as being imported. must be unique for the data type. is empty for geometry data. may be changed by the user.
 
string input_ident
 the ident of the data item as found in the file. duplicates are allowed. is empty if geometry data
 
 mutable
 

Detailed Description

defines a data item which was found in an input file

It encapsulates information being found on this data item in the specific file. It knows:

  • scalar data, node data, element data, intpt data. If any information on FEM meshes is found, it is marked as
    See also
    MESH Data.
  • Further it knows: the ident, the column index in the data matrix (for tensors), the ident to be used after import...
  • For mesh data, it also remembers the mesh itself. This is required to check persistency if another mesh is to be added (Sometimes, the mesh is defined in two files - no error. Sometimes one wants to add two meshes from two files - error.).

Member Enumeration Documentation

◆ enum_format_type

defines the format of a file

Note
In order to stay compatible with existing script files, do only append new items to this list! This list will directly influence the sort order in the item vector
Enumerator
NO_FILE 

not from file

LSDYNA 

LS-DYNA Dynain format.

NASTRAN 

NASTRAN input format.

NASTRAN_DATA 

NASTRAN data format.

IMAGE 

pixel-image file (PNG)

PERMAS 

PERMAS mesh file format.

STL 

STL mesh file format.

SRB_NODE_DATA 

SRB node data.

CSV_ELEMENT_DATA 

CSV file (values interpreted as element data)

CSV_NODE_DATA 

CSV file (values interpreted as node data)

CSV_SIGNAL_DATA 

CSV file (values interpreted as signal data)

ABAQUS 

Abaqus.

CSV_GRID2D 

CSV file (values interpreted as node coordinate data)

CSV_GRID3D 

CSV file (values interpreted as node coordinate data)

LSDYNA_LSPREPOST 

LSPrePost output files (e.g. to visualize data plots of arbitrary node and element data)

VTK 

VTK format.

ANSYS_RST 

ANSYS binary structural or coupled-field analysis result.

ANSYS_APDL 

ANSYS APDL input file format. Includes *.dat and *.cdb (blocked and unblocke)

CSV_FLUENT 

FLUENT CSV (values interpreted as coordinates and data fields)

CSV_SIGNAL_MESH 

CSV file (values interpreted as signal mesh + data)

◆ Type

enum Type

defines the type of data item

Note
In order to stay compatible with existing script files, do only append new items to this list! This list will directly influence the sort order in the item vector
Enumerator
MESH 

contains mesh information

ELEMENT 

element data

NODE 

node data

INTPT 

intpt data

SCALAR 

scalar data

NODE_COOR_X 

nodal x-coordinate (extracted from geometry), is always present and is not associated with a file

NODE_COOR_Y 

nodal y-coordinate (extracted from geometry), is always present and is not associated with a file

NODE_COOR_Z 

nodal z-coordinate (extracted from geometry), is always present and is not associated with a file

NODE_COOR_DEVIATION_X 

NODE coordinate deviation x.

NODE_COOR_DEVIATION_Y 

NODE coordinate deviation y.

NODE_COOR_DEVIATION_Z 

NODE coordinate deviation z.

NODE_COOR_DEVIATION_NORM 

NODE coordinate normal deviation.

Constructor & Destructor Documentation

◆ ImportItemInfo() [1/3]

ImportItemInfo ( string  par_filename,
enum_format_type  par_file_format,
Type  par_data_type,
number  par_column,
string  par_input_ident,
string  par_imported_ident = "",
MetaStructure  par_mesh_info = MetaStructure(),
bool  par_do_import = true 
)

constructor

Parameters
par_filenamesets filename
par_file_formatsets file_format
par_data_typesets data_type
par_columnsets column (0..n-1)
par_input_identsets input_ident
par_mesh_infosets mesh_info
par_imported_identsets imported_ident. If it is equal to "", then imported_ident will be equal to input_ident
par_do_importsets do_import /

◆ ImportItemInfo() [2/3]

copy constructor

Parameters
otherthe source object

◆ ImportItemInfo() [3/3]

Default constructor.

Note
Do not use it! It is a dummy for usage with SWIG!

Member Function Documentation

◆ objectType()

static dataobject_types objectType ( ImportItemInfo::Type  type)
static
Parameters
typethe given data type
Returns
returns the dataobject type that is assocoiated with this kind of data

◆ operator=()

ImportItemInfo operator= ( ImportItemInfo  other)

copy-assign operator

Parameters
otherthe source object to be copy-assigned

◆ toScript() [1/2]

static string toScript ( ImportItemInfo::enum_format_type  type)
static
Parameters
typethe given file format
Returns
a string representation of the enum used in Lua code

◆ toScript() [2/2]

static string toScript ( ImportItemInfo::Type  type)
static
Parameters
typethe given data type
Returns
a string representation of the enum used in Lua code

◆ toString() [1/2]

static string toString ( ImportItemInfo::enum_format_type  type)
static
Parameters
typethe given file format
Returns
a string representation of the enum

◆ toString() [2/2]

static string toString ( ImportItemInfo::Type  type)
static
Parameters
typethe given data type
Returns
a string representation of the enum

Connect with Ansys