    

 ## On this page

  

 

 # Interface ModelCenter::IFileVariable

 Last update: 16.07.2025 

![](https://img.shields.io/badge/language-IDL-blue "IDL")![](https://img.shields.io/badge/-public-brightgreen "public")

**Definition**: `ModelCenter/src/ModelCenter.odl` (line 2933)

COM Instance

**Inherits from**:

- [ModelCenter::IVariable](interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable)

## Members

- [dependentLinks](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1a46a1da5e2a3f39c2e413b520ec33407f)
- [dependents](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1ac63897b5927f1ad28965384718c0de6b)
- [description](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1ac0f28c2d059dc02d18d3dd8eaba19f31)
- [directDependents](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1a9347c073e1dc6ca62f1b3c7cd6fbec71)
- [directPrecedents](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1aea8561351c3ff1e003d463616682a838)
- [directTransfer](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1a248392894f6cd7f2662f29c3f110d7af)
- [fileExtension](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1ad161b90c198e19be1132a9e5592e9416)
- [fromFile](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1a9ca208f1854ac22bb31e38119e2e2af5)
- [fromString](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1ac7654e743af45785904858d2c581058d)
- [getFullName](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1a5b0b8db5aec4ebfbd8e7918568c71b70)
- [getMetadata](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1a730717369f8ddb8fccfcb3405c56afe3)
- [getName](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1adbaa029c76034043ccdf2bf84bbd0e7f)
- [getType](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1aec7c7bb8f9e43d411c457d7b091e5378)
- [hasChanged](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1aa81da335ee85ebf5f806be0b1bc1f39c)
- [hide](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1a6c602247c4c00069af837d7dcbfb3862)
- [invalidate](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1a2beb5e20db0843a92acf8d0cc961e3af)
- [isBinary](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1a2d900fe8d944b0dceaea355cf64ba5a8)
- [isInput](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1a92363045c1f3285c5c1127ad149c0250)
- [isInputToComponent](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1a8ca654408734e709fddeb945e81a5d29)
- [isInputToModel](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1a7bd0dbfb0063987f2484dce0cd61c8d1)
- [isValid](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1a2d8ceabbeb9640dffb9f6a9e654bbd79)
- [OwningComponent](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1a75e79199eccdfb4f00ce0d27f2f1c593)
- [precedentLinks](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1a4bc52bbf01e5d0a0f95e67e03cce4547)
- [precedents](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1a8db95046419c83467475175b216efe84)
- [readFile](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1a93be7b40a50c1d8b612037a105f8fd5f)
- [saveWithModel](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1a4ad8feb4200950e76e3ea66afcee286b)
- [setMetadata](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1ad532913f25d0b0d02cc2c27105e7ecc8)
- [toFile](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1aa3da8eb730cd02ed21080272cc41deb5)
- [toFileAbsolute](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1a45afd477c357c9c3002a4046c1eefd32)
- [toString](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1ae28a776965df5807d9ce8b2e0d995867)
- [toStringAbsolute](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1a0dda099769e13bdd8c5c076fc7d9378a)
- [validate](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1aa3fdf5883f1849f93bf87256b9100d0b)
- [value](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1a44a74adf54ce33e5e11d52ff561b37ad)
- [writeFile](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1ac5ccf89eeca381ed315bbc4080c5df6b)
- [writeFileAbsolute](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1ae4220f9f0731a8078169bab709fb9198)

## Properties

<a id="interfaceModelCenter_1_1IFileVariable_1aa81da335ee85ebf5f806be0b1bc1f39c"></a>

### Property hasChanged

![](https://img.shields.io/badge/-public-brightgreen "public")

**Definition**: `ModelCenter/src/ModelCenter.odl` (line 1)

```
boolean ModelCenter::IFileVariable::hasChanged

```

**Return type**: boolean

<a id="interfaceModelCenter_1_1IFileVariable_1a6c602247c4c00069af837d7dcbfb3862"></a>

### Property hide

![](https://img.shields.io/badge/-public-brightgreen "public")

**Definition**: `ModelCenter/src/ModelCenter.odl` (line 1)

```
boolean ModelCenter::IFileVariable::hide

```

**Return type**: boolean

<a id="interfaceModelCenter_1_1IFileVariable_1a75e79199eccdfb4f00ce0d27f2f1c593"></a>

### Property OwningComponent

![](https://img.shields.io/badge/-public-brightgreen "public")

**Definition**: `ModelCenter/src/ModelCenter.odl` (line 1)

```
LPDISPATCH ModelCenter::IFileVariable::OwningComponent

```

**Return type**: LPDISPATCH

<a id="interfaceModelCenter_1_1IFileVariable_1a44a74adf54ce33e5e11d52ff561b37ad"></a>

### Property value

![](https://img.shields.io/badge/-public-brightgreen "public")

**Definition**: `ModelCenter/src/ModelCenter.odl` (line 1)

```
BSTR ModelCenter::IFileVariable::value

```

Value of the variable.

**Return type**: BSTR

<a id="interfaceModelCenter_1_1IFileVariable_1a2d900fe8d944b0dceaea355cf64ba5a8"></a>

### Property isBinary

![](https://img.shields.io/badge/-public-brightgreen "public")

**Definition**: `ModelCenter/src/ModelCenter.odl` (line 1)

```
boolean ModelCenter::IFileVariable::isBinary

```

Whether or not the file is binary.

**Return type**: boolean

<a id="interfaceModelCenter_1_1IFileVariable_1ad161b90c198e19be1132a9e5592e9416"></a>

### Property fileExtension

![](https://img.shields.io/badge/-public-brightgreen "public")

**Definition**: `ModelCenter/src/ModelCenter.odl` (line 1)

```
BSTR ModelCenter::IFileVariable::fileExtension

```

File extension of the variable. Used when opening the file in [ModelCenter](namespaceModelCenter.md#namespaceModelCenter).

**Return type**: BSTR

<a id="interfaceModelCenter_1_1IFileVariable_1ac0f28c2d059dc02d18d3dd8eaba19f31"></a>

### Property description

![](https://img.shields.io/badge/-public-brightgreen "public")

**Definition**: `ModelCenter/src/ModelCenter.odl` (line 1)

```
BSTR ModelCenter::IFileVariable::description

```

The description of the variable.

**Return type**: BSTR

<a id="interfaceModelCenter_1_1IFileVariable_1a4ad8feb4200950e76e3ea66afcee286b"></a>

### Property saveWithModel

![](https://img.shields.io/badge/-public-brightgreen "public")

**Definition**: `ModelCenter/src/ModelCenter.odl` (line 1)

```
boolean ModelCenter::IFileVariable::saveWithModel

```

Flag to indicate whether the file content to be saved with the Model file.

**Return type**: boolean

<a id="interfaceModelCenter_1_1IFileVariable_1a248392894f6cd7f2662f29c3f110d7af"></a>

### Property directTransfer

![](https://img.shields.io/badge/-public-brightgreen "public")

**Definition**: `ModelCenter/src/ModelCenter.odl` (line 1)

```
boolean ModelCenter::IFileVariable::directTransfer

```

Flag to indicate whether direct file transfer is used for incoming link.

**Return type**: boolean

## Public functions

<a id="interfaceModelCenter_1_1IFileVariable_1a2d8ceabbeb9640dffb9f6a9e654bbd79"></a>

### Function isValid

![](https://img.shields.io/badge/-public-brightgreen "public")

```
boolean ModelCenter::IFileVariable::isValid()

```

Returns whether or not the variable is valid.

**Returns**:

True if variable is valid. False if the variable is not valid.

**Return type**: boolean

**Reimplements**: [isValid](interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1a602d42ee0595c1c0408a536c31c61adb)

<a id="interfaceModelCenter_1_1IFileVariable_1aa3fdf5883f1849f93bf87256b9100d0b"></a>

### Function validate

![](https://img.shields.io/badge/-public-brightgreen "public")

```
void ModelCenter::IFileVariable::validate()

```

Validates the variable by running the component if needed.

**Return type**: void

**Reimplements**: [validate](interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1a6748764fba94242fbe35ae2f4d49c9ef)

<a id="interfaceModelCenter_1_1IFileVariable_1adbaa029c76034043ccdf2bf84bbd0e7f"></a>

### Function getName

![](https://img.shields.io/badge/-public-brightgreen "public")

```
BSTR ModelCenter::IFileVariable::getName()

```

Gets the name of the variable.

**Returns**:

The name of the variable.

**Return type**: BSTR

**Reimplements**: [getName](interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1ae1ad6db87e29a4b265ec310295fb3843)

<a id="interfaceModelCenter_1_1IFileVariable_1a5b0b8db5aec4ebfbd8e7918568c71b70"></a>

### Function getFullName

![](https://img.shields.io/badge/-public-brightgreen "public")

```
BSTR ModelCenter::IFileVariable::getFullName()

```

Gets the full ModelCenter path of the variable.

**Returns**:

The full ModelCenter path of the variable.

**Return type**: BSTR

**Reimplements**: [getFullName](interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1a05a46370dd23d612bf0f09f146ba32a0)

<a id="interfaceModelCenter_1_1IFileVariable_1aec7c7bb8f9e43d411c457d7b091e5378"></a>

### Function getType

![](https://img.shields.io/badge/-public-brightgreen "public")

```
BSTR ModelCenter::IFileVariable::getType()

```

Gets the type of the variable.

**Returns**:

The type of the variable as a string.

**Return type**: BSTR

**Reimplements**: [getType](interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1ab7fadd397a7779f29005048383a9f187)

<a id="interfaceModelCenter_1_1IFileVariable_1a92363045c1f3285c5c1127ad149c0250"></a>

### Function isInput

![](https://img.shields.io/badge/-public-brightgreen "public")

```
boolean ModelCenter::IFileVariable::isInput()

```

Finds out whether or not the variable is an input with respect to the model. Returns the same value as [isInputToModel](interfaceModelCenter_1_1IFileVariable.md#interfaceModelCenter_1_1IFileVariable_1a7bd0dbfb0063987f2484dce0cd61c8d1).

**Return values**:

- **true**: Input
- **false**: Output

**Return type**: boolean

**Reimplements**: [isInput](interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1a875481ba3799c222c5085c6c3ca802a7)

<a id="interfaceModelCenter_1_1IFileVariable_1ae28a776965df5807d9ce8b2e0d995867"></a>

### Function toString

![](https://img.shields.io/badge/-public-brightgreen "public")

```
BSTR ModelCenter::IFileVariable::toString()

```

Converts the variable value to a string, validating the variable if necessary.

**Returns**:

The value of the variable as a string.

**Return type**: BSTR

**Reimplements**: [toString](interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1a6421656e090846e8d7c079b8511fa9d2)

<a id="interfaceModelCenter_1_1IFileVariable_1ac7654e743af45785904858d2c581058d"></a>

### Function fromString

![](https://img.shields.io/badge/-public-brightgreen "public")

```
void ModelCenter::IFileVariable::fromString(BSTR value)

```

Sets the value of the variable from the specified string.

**Parameters**:

- **value**: New value.

**Parameters**:

- BSTR **value**

**Return type**: void

**Reimplements**: [fromString](interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1a3f6325a128422d445705553f11563904)

<a id="interfaceModelCenter_1_1IFileVariable_1a0dda099769e13bdd8c5c076fc7d9378a"></a>

### Function toStringAbsolute

![](https://img.shields.io/badge/-public-brightgreen "public")

```
BSTR ModelCenter::IFileVariable::toStringAbsolute()

```

Converts the value of the variable to a string.

**Returns**:

The value of the variable as a string.

**Return type**: BSTR

**Reimplements**: [toStringAbsolute](interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1a5e66075d2bff0f7de435056cdc6c011e)

<a id="interfaceModelCenter_1_1IFileVariable_1a2beb5e20db0843a92acf8d0cc961e3af"></a>

### Function invalidate

![](https://img.shields.io/badge/-public-brightgreen "public")

```
void ModelCenter::IFileVariable::invalidate()

```

Marks the variable as invalid (needs to be computed). This will set all dependent variables invalid also.

**Return type**: void

**Reimplements**: [invalidate](interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1addc5f809058b5573390f62d34b5f5498)

<a id="interfaceModelCenter_1_1IFileVariable_1aea8561351c3ff1e003d463616682a838"></a>

### Function directPrecedents

![](https://img.shields.io/badge/-public-brightgreen "public")

```
LPDISPATCH ModelCenter::IFileVariable::directPrecedents([optional]VARIANT followSuspended, [optional]VARIANT reserved)

```

Returns a list of variables that are immediate precedents to the value of this variable. This function returns all variables that influence this variable and are directly connected via a link to it.

**Parameters**:

- **followSuspended**: Optional boolean specifies whether links which are suspended should be included in the search. Default is false.
- **reserved**: Reserved for future use.

**Returns**:

IDispatch\* to an [IVariables](interfaceModelCenter_1_1IVariables.md#interfaceModelCenter_1_1IVariables) object.

**Parameters**:

- *\[optional\]* VARIANT **followSuspended**
- *\[optional\]* VARIANT **reserved**

**Return type**: LPDISPATCH

**Reimplements**: [directPrecedents](interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1a655ce10f3a6e2839f11161e8bf13b0c2)

<a id="interfaceModelCenter_1_1IFileVariable_1a9347c073e1dc6ca62f1b3c7cd6fbec71"></a>

### Function directDependents

![](https://img.shields.io/badge/-public-brightgreen "public")

```
LPDISPATCH ModelCenter::IFileVariable::directDependents([optional]VARIANT followSuspended, [optional]VARIANT reserved)

```

Returns a list of variables that are immediate dependents of the value of this variable. This function returns all variables that are influenced by this variable and are directly connected via a link to it.

**Parameters**:

- **followSuspended**: Optional boolean specifies whether links which are suspended should be included in the search. Default is false.
- **reserved**: Reserved for future use.

**Returns**:

IDispatch\* to an [IVariables](interfaceModelCenter_1_1IVariables.md#interfaceModelCenter_1_1IVariables) object.

**Parameters**:

- *\[optional\]* VARIANT **followSuspended**
- *\[optional\]* VARIANT **reserved**

**Return type**: LPDISPATCH

**Reimplements**: [directDependents](interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1a64c800317037f03a43c8522061885835)

<a id="interfaceModelCenter_1_1IFileVariable_1a4bc52bbf01e5d0a0f95e67e03cce4547"></a>

### Function precedentLinks

![](https://img.shields.io/badge/-public-brightgreen "public")

```
LPDISPATCH ModelCenter::IFileVariable::precedentLinks([optional]VARIANT reserved)

```

Returns a list of links that are immediate precedents to the value of this variable. All the returned links will have this variable as the LHS of the equation. Except for arrays, the returned list will be 1 element long.

**Parameters**:

- **reserved**: Reserved for future use.

**Returns**:

IDispatch\* to an [IVariableLinks](interfaceModelCenter_1_1IVariableLinks.md#interfaceModelCenter_1_1IVariableLinks) object.

**Parameters**:

- *\[optional\]* VARIANT **reserved**

**Return type**: LPDISPATCH

**Reimplements**: [precedentLinks](interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1a9d52333bc9a07146e23124f0fe95db6f)

<a id="interfaceModelCenter_1_1IFileVariable_1a46a1da5e2a3f39c2e413b520ec33407f"></a>

### Function dependentLinks

![](https://img.shields.io/badge/-public-brightgreen "public")

```
LPDISPATCH ModelCenter::IFileVariable::dependentLinks([optional]VARIANT reserved)

```

Returns a list of links that immediately depend on the value of this variable. All the returned links will have this variable as part of a RHS equation.

**Parameters**:

- **reserved**: Reserved for future use.

**Returns**:

IDispatch\* to an [IVariableLinks](interfaceModelCenter_1_1IVariableLinks.md#interfaceModelCenter_1_1IVariableLinks) object.

**Parameters**:

- *\[optional\]* VARIANT **reserved**

**Return type**: LPDISPATCH

**Reimplements**: [dependentLinks](interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1a1e52cc38574fbdf83e9dba836dfc5959)

<a id="interfaceModelCenter_1_1IFileVariable_1a8db95046419c83467475175b216efe84"></a>

### Function precedents

![](https://img.shields.io/badge/-public-brightgreen "public")

```
LPDISPATCH ModelCenter::IFileVariable::precedents([optional]VARIANT followSuspended, [optional]VARIANT reserved)

```

Returns a list of variables that are precedents to the value of this variable. This function returns all variables that influence this variable, not just directly connected ones.

**Parameters**:

- **followSuspended**: Optional boolean specifies whether links which are suspended should be included in the search. Default is false.
- **reserved**: Reserved for future use.

**Returns**:

IDispatch\* to an [IVariables](interfaceModelCenter_1_1IVariables.md#interfaceModelCenter_1_1IVariables) object.

**Parameters**:

- *\[optional\]* VARIANT **followSuspended**
- *\[optional\]* VARIANT **reserved**

**Return type**: LPDISPATCH

**Reimplements**: [precedents](interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1ad1f5d5ba3e96e9c2fab7a4b0d6c4df36)

<a id="interfaceModelCenter_1_1IFileVariable_1ac63897b5927f1ad28965384718c0de6b"></a>

### Function dependents

![](https://img.shields.io/badge/-public-brightgreen "public")

```
LPDISPATCH ModelCenter::IFileVariable::dependents([optional]VARIANT followSuspended, [optional]VARIANT reserved)

```

Returns a list of variables that are dependent upon the value of this variable. This function returns all variables that are influenced by this variable, not just directly connected ones.

**Parameters**:

- **followSuspended**: Optional boolean specifies whether links which are suspended should be included in the search. Default is false.
- **reserved**: Reserved for future use.

**Returns**:

IDispatch\* to an [IVariables](interfaceModelCenter_1_1IVariables.md#interfaceModelCenter_1_1IVariables) object.

**Parameters**:

- *\[optional\]* VARIANT **followSuspended**
- *\[optional\]* VARIANT **reserved**

**Return type**: LPDISPATCH

**Reimplements**: [dependents](interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1a6f42f3176eb8fa2fbf9ca1b9a01fc7ce)

<a id="interfaceModelCenter_1_1IFileVariable_1a8ca654408734e709fddeb945e81a5d29"></a>

### Function isInputToComponent

![](https://img.shields.io/badge/-public-brightgreen "public")

```
boolean ModelCenter::IFileVariable::isInputToComponent()

```

Checks whether or not the variable is an input. Returns true if the variable was originally added as an input, ignoring the current state that can change based off of links.

**Return values**:

- **true**: Input
- **false**: Output

**Return type**: boolean

**Reimplements**: [isInputToComponent](interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1a81ddff978026124a52063b1fad430b27)

<a id="interfaceModelCenter_1_1IFileVariable_1a7bd0dbfb0063987f2484dce0cd61c8d1"></a>

### Function isInputToModel

![](https://img.shields.io/badge/-public-brightgreen "public")

```
boolean ModelCenter::IFileVariable::isInputToModel()

```

Checks whether or not the variable is an input. A linked input returns false (Output).

**Return values**:

- **true**: Input
- **false**: Output

**Return type**: boolean

**Reimplements**: [isInputToModel](interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1a0bd883d3757e361b75e0f81627e6ce98)

<a id="interfaceModelCenter_1_1IFileVariable_1ad532913f25d0b0d02cc2c27105e7ecc8"></a>

### Function setMetadata

![](https://img.shields.io/badge/-public-brightgreen "public")

```
void ModelCenter::IFileVariable::setMetadata(BSTR name, MetadataType type, VARIANT value, MetadataAccess access, boolean archive)

```

Sets the meta data value of the given meta data key name.

**Parameters**:

- **name**: Metadata specifier used to store the data.
- **type**:
- **value**:
- **access**:
- **archive**:

**Parameters**:

- BSTR **name**
- [MetadataType](namespaceModelCenter.md#namespaceModelCenter_1a59560dc5274b3a18daae06b531055153) **type**
- VARIANT **value**
- [MetadataAccess](namespaceModelCenter.md#namespaceModelCenter_1afea526d882aa1a4fd48b5a28b7b1c9dc) **access**
- boolean **archive**

**Return type**: void

**Reimplements**: [setMetadata](interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1af7cbf8f2c8d128c760fb09254819bf64)

<a id="interfaceModelCenter_1_1IFileVariable_1a730717369f8ddb8fccfcb3405c56afe3"></a>

### Function getMetadata

![](https://img.shields.io/badge/-public-brightgreen "public")

```
VARIANT ModelCenter::IFileVariable::getMetadata(BSTR name)

```

Gets the meta data value of the given meta data key name.

**Parameters**:

- **name**: Metadata key name.

**Returns**:

Metadata value.

**Parameters**:

- BSTR **name**

**Return type**: VARIANT

**Reimplements**: [getMetadata](interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1a610297790a8c506c339586740f1d3022)

<a id="interfaceModelCenter_1_1IFileVariable_1aa3da8eb730cd02ed21080272cc41deb5"></a>

### Function toFile

![](https://img.shields.io/badge/-public-brightgreen "public")

```
void ModelCenter::IFileVariable::toFile(BSTR fileName, [optional] VARIANT encoding)

```

Writes the value of the variable to a file.

**Parameters**:

- **fileName**: Path of the file.
- **encoding**: File encoding to be used (ascii, utf-8, binary).

**Parameters**:

- BSTR **fileName**
- *\[optional\]* VARIANT **encoding**

**Return type**: void

<a id="interfaceModelCenter_1_1IFileVariable_1a9ca208f1854ac22bb31e38119e2e2af5"></a>

### Function fromFile

![](https://img.shields.io/badge/-public-brightgreen "public")

```
void ModelCenter::IFileVariable::fromFile(BSTR fileName)

```

Sets the value of the variable from a specified file.

**Parameters**:

- **fileName**: Path of the file.

**Parameters**:

- BSTR **fileName**

**Return type**: void

<a id="interfaceModelCenter_1_1IFileVariable_1ac5ccf89eeca381ed315bbc4080c5df6b"></a>

### Function writeFile

![](https://img.shields.io/badge/-public-brightgreen "public")

```
void ModelCenter::IFileVariable::writeFile(BSTR fileName)

```

Writes the value of the variable to a file.

**Parameters**:

- **fileName**: Path of the file.

**Parameters**:

- BSTR **fileName**

**Return type**: void

<a id="interfaceModelCenter_1_1IFileVariable_1a93be7b40a50c1d8b612037a105f8fd5f"></a>

### Function readFile

![](https://img.shields.io/badge/-public-brightgreen "public")

```
void ModelCenter::IFileVariable::readFile(BSTR fileName)

```

Sets the value of the variable from a specified file.

**Parameters**:

- **fileName**: Path of the file.

**Parameters**:

- BSTR **fileName**

**Return type**: void

<a id="interfaceModelCenter_1_1IFileVariable_1a45afd477c357c9c3002a4046c1eefd32"></a>

### Function toFileAbsolute

![](https://img.shields.io/badge/-public-brightgreen "public")

```
void ModelCenter::IFileVariable::toFileAbsolute(BSTR fileName, [optional] VARIANT encoding)

```

Writes the absolute value of the variable to a file. Optional parameter to specify the encoding as ASCII, UTF-8 or binary. If no encoding is specified, will default to ASCII for text files and binary for binary files. Will throw an exception if binary encoding is used on a text file or if ascii or utf-8 encoding is used on a binary file.

**Parameters**:

- **fileName**: Path of the file.
- **encoding**: The desired encoding of the file. Can be: 'ascii', 'utf-8', or 'binary'.

**Parameters**:

- BSTR **fileName**
- *\[optional\]* VARIANT **encoding**

**Return type**: void

<a id="interfaceModelCenter_1_1IFileVariable_1ae4220f9f0731a8078169bab709fb9198"></a>

### Function writeFileAbsolute

![](https://img.shields.io/badge/-public-brightgreen "public")

```
void ModelCenter::IFileVariable::writeFileAbsolute(BSTR fileName)

```

Writes the absolute value of the variable to a file.

**Parameters**:

- **fileName**: Path of the file.

**Parameters**:

- BSTR **fileName**

**Return type**: void