FixedWidthImportSettings#

class ansys.mechanical.stubs.v261.Ansys.Mechanical.ExternalData.FixedWidthImportSettings#

Bases: object

defines how to import external data from a fixed-width source file.

Overview#

Clear

Equals

Equals method.

GetEnumerator

GetHashCode

GetHashCode method.

GetType

GetType method.

RemoveAt

Removes the import definition at the specified index.

ToString

ToString method.

UseColumn

Add a column to be imported from the specified data source column index and configured

AverageCornerNodesToMidsideNodes

If set to Yes, the data at Midside nodes is calculated as average of data specified at corner nodes.

ColumnWidths

Gets or sets the specified column widths as a string using Fortran-esque fixed-format specifications.

Count

Gets the number of column definitions.

Format

Gets the existing corresponding format.

Item

Item property.

SkipFooter

Gets or sets the number of rows to ignore at the end of the file during import.

SkipRows

Gets or sets the number of rows to skip over at the start of the file during import.

Property detail#

property FixedWidthImportSettings.AverageCornerNodesToMidsideNodes: bool | None#

If set to Yes, the data at Midside nodes is calculated as average of data specified at corner nodes.

Defaults to False.

This property is used only when there is another external data file defined with MAPDL import format.

property FixedWidthImportSettings.ColumnWidths: str | None#

Gets or sets the specified column widths as a string using Fortran-esque fixed-format specifications.

This is equivalent to the “User-Defined” format specifier for External Data as described in the product documentation.

Note, however, that regardless of the format specifier all imported columns WILL be interpreted using the .NET command double.TryParse() to support the requirements of the underlying variable data for Table.

In the example below, the line has one integer followed by four exponential data types. 385 8.333333333E-003 9.375000000E-003 3.375000000E-001 0.000000000E+000 The corresponding format is 1i3,4e17.9 Where: The first entry is the number of occurrences The second entry is the format specifier The third entry is the number of characters of data in the definition(including numeric values (0-9), the letter 'e' (for instances of scientific notation), and any white space and + or - signs) The fourth entry is the number of digits after the decimal point.

property FixedWidthImportSettings.Count: int | None#

Gets the number of column definitions.

property FixedWidthImportSettings.Format: Ansys.Mechanical.DataModel.MechanicalEnums.ExternalData.ImportFormat | None#

Gets the existing corresponding format.

property FixedWidthImportSettings.Item: Ansys.Mechanical.ExternalData.ColumnarDataImportDefinition | None#

Item property.

property FixedWidthImportSettings.SkipFooter: int | None#

Gets or sets the number of rows to ignore at the end of the file during import.

property FixedWidthImportSettings.SkipRows: int | None#

Gets or sets the number of rows to skip over at the start of the file during import.

Method detail#

FixedWidthImportSettings.Clear() None#
FixedWidthImportSettings.Equals(obj: Any) bool#

Equals method.

FixedWidthImportSettings.GetEnumerator() Iterator[Ansys.Mechanical.ExternalData.ColumnarDataImportDefinition]#
FixedWidthImportSettings.GetHashCode() int#

GetHashCode method.

FixedWidthImportSettings.GetType() type#

GetType method.

FixedWidthImportSettings.RemoveAt(index: int) None#

Removes the import definition at the specified index.

FixedWidthImportSettings.ToString() str#

ToString method.

FixedWidthImportSettings.UseColumn(index: int, variableType: Ansys.Mechanical.DataModel.MechanicalEnums.ExternalData.VariableType, unit: str, name: str) Ansys.Mechanical.ExternalData.ColumnarDataSourceBase#
Add a column to be imported from the specified data source column index and configured
as the specified variable type. The order in which columns are added determines their
order in the table/>.

If unit is `null`, the default unit (in the active unit system) for the specified
variable type will be assumed during import.

If name is `null` or empty, a unique name will be generated from the specified
variableType during import.

A reference to the instance is returned so that invocations can be chained together.