> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Interface ModelCenter::IFileVariable

![][IDL]
![][public]

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

COM Instance

**Inherits from**:

* [ModelCenter::IVariable](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2025-r1/modelcenter-api-md/interfaceModelCenter_1_1IVariable.md)

## Members

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

## Properties

### Property hasChanged

![][public]

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

```text theme={null}
boolean ModelCenter::IFileVariable::hasChanged
```

**Return type**: boolean

### Property hide

![][public]

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

```text theme={null}
boolean ModelCenter::IFileVariable::hide
```

**Return type**: boolean

### Property OwningComponent

![][public]

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

```text theme={null}
LPDISPATCH ModelCenter::IFileVariable::OwningComponent
```

**Return type**: LPDISPATCH

### Property value

![][public]

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

```text theme={null}
BSTR ModelCenter::IFileVariable::value
```

Value of the variable.

**Return type**: BSTR

### Property isBinary

![][public]

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

```text theme={null}
boolean ModelCenter::IFileVariable::isBinary
```

Whether or not the file is binary.

**Return type**: boolean

### Property fileExtension

![][public]

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

```text theme={null}
BSTR ModelCenter::IFileVariable::fileExtension
```

File extension of the variable. Used when opening the file in [ModelCenter](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2025-r1/modelcenter-api-md/namespaceModelCenter).

**Return type**: BSTR

### Property description

![][public]

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

```text theme={null}
BSTR ModelCenter::IFileVariable::description
```

The description of the variable.

**Return type**: BSTR

### Property saveWithModel

![][public]

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

```text theme={null}
boolean ModelCenter::IFileVariable::saveWithModel
```

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

**Return type**: boolean

### Property directTransfer

![][public]

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

```text theme={null}
boolean ModelCenter::IFileVariable::directTransfer
```

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

**Return type**: boolean

## Public functions

### Function isValid

![][public]

```text theme={null}
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](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2025-r1/modelcenter-api-md/interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1a602d42ee0595c1c0408a536c31c61adb)

### Function validate

![][public]

```text theme={null}
void ModelCenter::IFileVariable::validate()
```

Validates the variable by running the component if needed.

**Return type**: void

**Reimplements**: [validate](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2025-r1/modelcenter-api-md/interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1a6748764fba94242fbe35ae2f4d49c9ef)

### Function getName

![][public]

```text theme={null}
BSTR ModelCenter::IFileVariable::getName()
```

Gets the name of the variable.

**Returns**:

The name of the variable.

**Return type**: BSTR

**Reimplements**: [getName](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2025-r1/modelcenter-api-md/interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1ae1ad6db87e29a4b265ec310295fb3843)

### Function getFullName

![][public]

```text theme={null}
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](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2025-r1/modelcenter-api-md/interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1a05a46370dd23d612bf0f09f146ba32a0)

### Function getType

![][public]

```text theme={null}
BSTR ModelCenter::IFileVariable::getType()
```

Gets the type of the variable.

**Returns**:

The type of the variable as a string.

**Return type**: BSTR

**Reimplements**: [getType](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2025-r1/modelcenter-api-md/interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1ab7fadd397a7779f29005048383a9f187)

### Function isInput

![][public]

```text theme={null}
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_1a7bd0dbfb0063987f2484dce0cd61c8d1).

**Return values**:

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

**Return type**: boolean

**Reimplements**: [isInput](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2025-r1/modelcenter-api-md/interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1a875481ba3799c222c5085c6c3ca802a7)

### Function toString

![][public]

```text theme={null}
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](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2025-r1/modelcenter-api-md/interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1a6421656e090846e8d7c079b8511fa9d2)

### Function fromString

![][public]

```text theme={null}
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](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2025-r1/modelcenter-api-md/interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1a3f6325a128422d445705553f11563904)

### Function toStringAbsolute

![][public]

```text theme={null}
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](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2025-r1/modelcenter-api-md/interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1a5e66075d2bff0f7de435056cdc6c011e)

### Function invalidate

![][public]

```text theme={null}
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](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2025-r1/modelcenter-api-md/interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1addc5f809058b5573390f62d34b5f5498)

### Function directPrecedents

![][public]

```text theme={null}
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](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2025-r1/modelcenter-api-md/interfaceModelCenter_1_1IVariables.md) object.

**Parameters**:

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

**Return type**: LPDISPATCH

**Reimplements**: [directPrecedents](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2025-r1/modelcenter-api-md/interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1a655ce10f3a6e2839f11161e8bf13b0c2)

### Function directDependents

![][public]

```text theme={null}
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](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2025-r1/modelcenter-api-md/interfaceModelCenter_1_1IVariables.md) object.

**Parameters**:

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

**Return type**: LPDISPATCH

**Reimplements**: [directDependents](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2025-r1/modelcenter-api-md/interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1a64c800317037f03a43c8522061885835)

### Function precedentLinks

![][public]

```text theme={null}
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](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2025-r1/modelcenter-api-md/interfaceModelCenter_1_1IVariableLinks.md) object.

**Parameters**:

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

**Return type**: LPDISPATCH

**Reimplements**: [precedentLinks](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2025-r1/modelcenter-api-md/interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1a9d52333bc9a07146e23124f0fe95db6f)

### Function dependentLinks

![][public]

```text theme={null}
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](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2025-r1/modelcenter-api-md/interfaceModelCenter_1_1IVariableLinks.md) object.

**Parameters**:

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

**Return type**: LPDISPATCH

**Reimplements**: [dependentLinks](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2025-r1/modelcenter-api-md/interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1a1e52cc38574fbdf83e9dba836dfc5959)

### Function precedents

![][public]

```text theme={null}
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](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2025-r1/modelcenter-api-md/interfaceModelCenter_1_1IVariables.md) object.

**Parameters**:

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

**Return type**: LPDISPATCH

**Reimplements**: [precedents](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2025-r1/modelcenter-api-md/interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1ad1f5d5ba3e96e9c2fab7a4b0d6c4df36)

### Function dependents

![][public]

```text theme={null}
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](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2025-r1/modelcenter-api-md/interfaceModelCenter_1_1IVariables.md) object.

**Parameters**:

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

**Return type**: LPDISPATCH

**Reimplements**: [dependents](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2025-r1/modelcenter-api-md/interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1a6f42f3176eb8fa2fbf9ca1b9a01fc7ce)

### Function isInputToComponent

![][public]

```text theme={null}
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](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2025-r1/modelcenter-api-md/interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1a81ddff978026124a52063b1fad430b27)

### Function isInputToModel

![][public]

```text theme={null}
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](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2025-r1/modelcenter-api-md/interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1a0bd883d3757e361b75e0f81627e6ce98)

### Function setMetadata

![][public]

```text theme={null}
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](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2025-r1/modelcenter-api-md/namespaceModelCenter#namespaceModelCenter_1a59560dc5274b3a18daae06b531055153) **type**
* VARIANT **value**
* [MetadataAccess](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2025-r1/modelcenter-api-md/namespaceModelCenter#namespaceModelCenter_1afea526d882aa1a4fd48b5a28b7b1c9dc) **access**
* boolean **archive**

**Return type**: void

**Reimplements**: [setMetadata](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2025-r1/modelcenter-api-md/interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1af7cbf8f2c8d128c760fb09254819bf64)

### Function getMetadata

![][public]

```text theme={null}
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](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2025-r1/modelcenter-api-md/interfaceModelCenter_1_1IVariable.md#interfaceModelCenter_1_1IVariable_1a610297790a8c506c339586740f1d3022)

### Function toFile

![][public]

```text theme={null}
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

### Function fromFile

![][public]

```text theme={null}
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

### Function writeFile

![][public]

```text theme={null}
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

### Function readFile

![][public]

```text theme={null}
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

### Function toFileAbsolute

![][public]

```text theme={null}
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

### Function writeFileAbsolute

![][public]

```text theme={null}
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

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

[private]: https://img.shields.io/badge/-private-red "private"

[IDL]: https://img.shields.io/badge/language-IDL-blue "IDL"
