> ## 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.

# Class Phoenix::ModelCenter::PlugIn::ModelCenterHost

![][C#]
![][public]

**Definition**: `LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/ModelCenterHost.cs` (line 25)

Class which wraps the [ModelCenter](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2026-r1/modelcenter-plugin-md/namespacePhoenix_1_1ModelCenter.md) COM API.

You should be using [SModelCenterHost](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2026-r1/modelcenter-plugin-md/classPhoenix_1_1ModelCenter_1_1PlugIn_1_1SModelCenterHost.md) instead of this class as it protects against certain crash cases.

**Inherits from**:

* AbstractDisposable

## Members

* [\_dataCollector](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1af0440fb1f4353ed9543dd8794a4dff0b)
* [AddIconToModelCenter](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a6f5205547369b30b1c5590f74d2abbbf)
* [AddToModel](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1afd553b0c5c840dd9680dc2461b877d7a)
* [AddVariable](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1ab2ff5ff428477dd1ee0f8189c7989e52)
* [BringModelCenterToTop](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a3904b9ddd397e5bf6f0696137c261950)
* [BringWindowToTop](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a5e13d297c0fdd3fe07c3b409512926e5)
* [CheckOutLicenseFeature](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a379829a3e5451e1c5e26c192df87b22a)
* [CheckOutLicenseFeature](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a4e2a66d613570f057634de8331e99b04)
* [CommitVariableChanges](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a4ca0e3d227db7f3ec0a974cb51f6aab6)
* [CreateNewDataCollector](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a8f94f3064e692fb2d4411f3abbaa0e53)
* [CreatePlugInFrame](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1ab8a8a1ac37d0d10264c73eac9e0de479)
* [createPlugInFrame](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a67e58a2ccfa0beb5f0a787a4f89e1ddd)
* [createPlugInFrame2](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1ab21afd821dd21abcc77a56485aafbf86)
* [CurrentVariables](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1ad601297c405159628738ad5b97406793)
* [DataCollector](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1af7867e29cc6b176b1cbb5606b6edb12c)
* [DataCollectorCreated](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a929cb8009eabe30d1aece8683ec33009)
* [DATE\_EPOCH\_SECONDS](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1ad99b49075883aaaca6867bb2283bb8d4)
* [DATE\_UTCG](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a96238a6caefa5b269c94506c165f506f)
* [DATE\_YEAR\_MONTH\_DAY](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a592f9a51b64073b2d68078ae351c3e64)
* [Dispose](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a1fc082def565a26bc758884a3b2cd395)
* [find](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a683c47bc4dd73890a9fd745ad582a5d2)
* [GetAssociatedFiles](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a98530df25274a6d4f97df818ca71adcb)
* [getGroups](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a97bba3e07fff792df8526ccfca141142)
* [GetHasChanged](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1ae7f0ecfcce6cd123a7634085e33202cd)
* [GetRawValue](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a0a03b567963e3acdff28141ef6156e8d)
* [GetValue](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a2558325e887f709dcde2bb192d2df659)
* [getVariableInternal](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a7a747e41558d5f2bc42b09bbd71f0a1d)
* [getVariables](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a61d7609496b704c1d9e9b6961e33c863)
* [init](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1af86901b5be12a8a3920472f7e9430e8b)
* [IsAddedToModel](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a61e8588dccef874b750ee4e260f5c88f)
* [Log](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a99dfa4f55011b2aba8707dfb06433b45)
* [mcVars](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a26dc4b9a04642618ca859370a16cb7f0)
* [ModelCenter](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1ad4b765496437da473601a097aedfc41f)
* [ModelCenterDirectory](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a2f25b52db66b21d837ce532ac5617a53)
* [ModelCenterHost](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a15492530e347c0b6306e07617c896866)
* [ModelCenterHost](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a68d4389ee6089d948e351ba2996bd4eb)
* [ModelCenterWindow](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a1251bc099fbbaf7161152d926d5aaecb)
* [ModelCenterWindowHandle](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a26d2f77e8705765dddf373af9fbb7a15)
* [ModelDirectory](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a5b0a381850d051b6981a99ae2d6988d4)
* [MyComponent](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1abaf0b8b3cef72bb6f1db9d56629870b5)
* [NumCurrentVariables](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a67920084dc66c8ba0e7fac0ae0483d1f)
* [RefreshFromModelCenter](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a0203ce77d55109e8f620049275fe2a49)
* [releaseMCVars](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a2b6669057c0df085fc411a0235de5b51)
* [ReleasePlugInFrame](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1ab8d4c710587a39f74a2ad87173ac4504)
* [ResetHasChanged](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a718352a73bbd638a51d898184af794c7)
* [retrieveVariablesRecursive](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1ac68ccbc867045c8e4307ad7c865cc610)
* [RootName](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1aa80035a72db792a18557d8169b809fb7)
* [SetAssociatedFiles](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a3dafe4d98d004dfc23562577533d365a)
* [SetAssociatedFiles](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1ad8c2b46cafae2661eebe84c47e504cb5)
* [SetGroupIcon](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1aec3362516b4ef6f553eeaaeacd2825c9)
* [SetValue](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a5065f85eb8decaf810de1678284f074b)
* [SetValue](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a021333879efad5e4347666dec2d95d1d)
* [setValueInternal](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a8697c4bb35f1d529ba41196a9a19ed4c)
* [ShowPlugInFrame](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a2b40976f847fa83b33a3db96ebe90dac)
* [variables](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1ab175d4d94fe3f2dfa05d006558936449)

## Private static attributes

### Variable DATE\_EPOCH\_SECONDS

![][private]
![][static]

**Definition**: `LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/ModelCenterHost.cs` (line 29)

```csharp theme={null}
const string Phoenix.ModelCenter.PlugIn.ModelCenterHost.DATE_EPOCH_SECONDS = "EpSec"
```

**Type**: const string

### Variable DATE\_YEAR\_MONTH\_DAY

![][private]
![][static]

**Definition**: `LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/ModelCenterHost.cs` (line 30)

```csharp theme={null}
const string Phoenix.ModelCenter.PlugIn.ModelCenterHost.DATE_YEAR_MONTH_DAY = "YYYY/MM/DD"
```

**Type**: const string

### Variable DATE\_UTCG

![][private]
![][static]

**Definition**: `LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/ModelCenterHost.cs` (line 31)

```csharp theme={null}
const string Phoenix.ModelCenter.PlugIn.ModelCenterHost.DATE_UTCG = "UTCG"
```

**Type**: const string

## Private attributes

### Variable mcVars

![][private]

**Definition**: `LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/ModelCenterHost.cs` (line 33)

```csharp theme={null}
readonly Dictionary<string, IVariable> Phoenix.ModelCenter.PlugIn.ModelCenterHost.mcVars = new Dictionary<string, IVariable>()
```

**Type**: readonly Dictionary\< string, IVariable >

### Variable variables

![][private]

**Definition**: `LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/ModelCenterHost.cs` (line 34)

```csharp theme={null}
readonly List<PHXVariable> Phoenix.ModelCenter.PlugIn.ModelCenterHost.variables = new List<PHXVariable>()
```

**Type**: readonly List\< PHXVariable >

### Variable \_dataCollector

![][private]

**Definition**: `LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/ModelCenterHost.cs` (line 36)

```csharp theme={null}
IDataCollector Phoenix.ModelCenter.PlugIn.ModelCenterHost._dataCollector = null
```

**Type**: IDataCollector

## Properties

### Property ModelCenter

![][public]

**Definition**: `LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/ModelCenterHost.cs` (line 45)

```csharp theme={null}
IModelCenter Phoenix.ModelCenter.PlugIn.ModelCenterHost.ModelCenter
```

Get the [ModelCenter](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2026-r1/modelcenter-plugin-md/namespacePhoenix_1_1ModelCenter.md) COM object.

**Return type**: IModelCenter

### Property DataCollector

![][public]

**Definition**: `LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/ModelCenterHost.cs` (line 50)

```csharp theme={null}
IDataCollector Phoenix.ModelCenter.PlugIn.ModelCenterHost.DataCollector
```

Get the DataCollector COM object.

**Return type**: IDataCollector

### Property AddToModel

![][public]

**Definition**: `LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/ModelCenterHost.cs` (line 63)

```csharp theme={null}
IAddToModel Phoenix.ModelCenter.PlugIn.ModelCenterHost.AddToModel
```

Get the AddToModel COM object.

**Return type**: IAddToModel

### Property MyComponent

![][public]

**Definition**: `LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/ModelCenterHost.cs` (line 68)

```csharp theme={null}
IComponent Phoenix.ModelCenter.PlugIn.ModelCenterHost.MyComponent
```

Get my component, if any. DO NOT DISPOSE.

**Return type**: IComponent

### Property Log

![][public]

**Definition**: `LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/ModelCenterHost.cs` (line 74)

```csharp theme={null}
IPHXLogger Phoenix.ModelCenter.PlugIn.ModelCenterHost.Log
```

Get the logger. This will always be available, but may not do anything on older MC versions.

**Return type**: IPHXLogger

### Property IsAddedToModel

![][public]

**Definition**: `LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/ModelCenterHost.cs` (line 203)

```csharp theme={null}
bool Phoenix.ModelCenter.PlugIn.ModelCenterHost.IsAddedToModel
```

Gets a value indicating whether the component has already been added to the model.

**Return type**: bool

### Property ModelDirectory

![][public]

**Definition**: `LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/ModelCenterHost.cs` (line 239)

```csharp theme={null}
string Phoenix.ModelCenter.PlugIn.ModelCenterHost.ModelDirectory
```

Get the directory of the current model.

**Return type**: string

### Property RootName

![][public]

**Definition**: `LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/ModelCenterHost.cs` (line 283)

```csharp theme={null}
string Phoenix.ModelCenter.PlugIn.ModelCenterHost.RootName
```

Get the name of my component.

**Return type**: string

### Property ModelCenterDirectory

![][public]

**Definition**: `LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/ModelCenterHost.cs` (line 289)

```csharp theme={null}
string Phoenix.ModelCenter.PlugIn.ModelCenterHost.ModelCenterDirectory
```

Get the [ModelCenter](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2026-r1/modelcenter-plugin-md/namespacePhoenix_1_1ModelCenter.md) install directory.

**Returns**:

**Return type**: string

### Property NumCurrentVariables

![][public]

**Definition**: `LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/ModelCenterHost.cs` (line 482)

```csharp theme={null}
int Phoenix.ModelCenter.PlugIn.ModelCenterHost.NumCurrentVariables
```

Get the number of variables.

**Return type**: int

### Property CurrentVariables

![][public]

**Definition**: `LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/ModelCenterHost.cs` (line 495)

```csharp theme={null}
IEnumerable<PHXVariable> Phoenix.ModelCenter.PlugIn.ModelCenterHost.CurrentVariables
```

Get or set a collection of the variables we've set/added (but perhaps not committed). On setting, the variables are cloned, and the changes are flushed through to [ModelCenter](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2026-r1/modelcenter-plugin-md/namespacePhoenix_1_1ModelCenter.md).

There are two ways to create variables - set them all at once by setting [CurrentVariables](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1ad601297c405159628738ad5b97406793), or set them individually with [AddVariable](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1ab2ff5ff428477dd1ee0f8189c7989e52) then commit with [CommitVariableChanges](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a4ca0e3d227db7f3ec0a974cb51f6aab6). Do not mix and match

**Return type**: IEnumerable\< PHXVariable >

### Property ModelCenterWindowHandle

![][public]

**Definition**: `LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/ModelCenterHost.cs` (line 735)

```csharp theme={null}
IntPtr Phoenix.ModelCenter.PlugIn.ModelCenterHost.ModelCenterWindowHandle
```

Get the handle of the [ModelCenter](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2026-r1/modelcenter-plugin-md/namespacePhoenix_1_1ModelCenter.md) window.

**Return type**: IntPtr

### Property ModelCenterWindow

![][public]

**Definition**: `LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/ModelCenterHost.cs` (line 754)

```csharp theme={null}
IWin32Window Phoenix.ModelCenter.PlugIn.ModelCenterHost.ModelCenterWindow
```

Get the [ModelCenter](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2026-r1/modelcenter-plugin-md/namespacePhoenix_1_1ModelCenter.md) window (actually just a handle wrapped in a utility class, but can be used as a window in many cases).

**Return type**: IWin32Window

## Events

### Event DataCollectorCreated

![][public]

**Definition**: `LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/ModelCenterHost.cs` (line 176)

```csharp theme={null}
DataCollectorCreatedEventHandler Phoenix.ModelCenter.PlugIn.ModelCenterHost.DataCollectorCreated
```

Event generated when a new data collector is created.

**Type**: [DataCollectorCreatedEventHandler](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2026-r1/modelcenter-plugin-md/namespacePhoenix_1_1ModelCenter_1_1PlugIn#namespacePhoenix_1_1ModelCenter_1_1PlugIn_1a281e7794e7f8958b5898e7793c96d109)

## Public functions

### Function ModelCenterHost

![][public]

```csharp theme={null}
Phoenix.ModelCenter.PlugIn.ModelCenterHost.ModelCenterHost(IModelCenter mc, IAddToModel atm)
```

Constructor.

**Parameters**:

* **mc**: The [ModelCenter](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2026-r1/modelcenter-plugin-md/namespacePhoenix_1_1ModelCenter.md) COM instance.
* **atm**: The AddToModel COM instance.

**Parameters**:

* IModelCenter **mc**
* IAddToModel **atm**

**Return type**:

### Function ModelCenterHost

![][public]

```csharp theme={null}
Phoenix.ModelCenter.PlugIn.ModelCenterHost.ModelCenterHost(IModelCenter mc, IAddToModel atm, IDataCollector dc)
```

Constructor.

**Parameters**:

* **mc**: The [ModelCenter](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2026-r1/modelcenter-plugin-md/namespacePhoenix_1_1ModelCenter.md) COM instance.
* **atm**: The AddToModel COM instance.
* **dc**: The DataCollector COM instance.

**Parameters**:

* IModelCenter **mc**
* IAddToModel **atm**
* IDataCollector **dc**

**Return type**:

### Function CreateNewDataCollector

![][public]

```csharp theme={null}
IDataCollector Phoenix.ModelCenter.PlugIn.ModelCenterHost.CreateNewDataCollector(string analysisType, string configuration)
```

Create a new data collector.

**Parameters**:

* **analysisType**: The type of trade study or analysis.
* **configuration**: The configuration string.

**Returns**:

The new data collector.

**Parameters**:

* string **analysisType**
* string **configuration**

**Return type**: IDataCollector

### Function GetAssociatedFiles

![][public]

```csharp theme={null}
IEnumerable< string > Phoenix.ModelCenter.PlugIn.ModelCenterHost.GetAssociatedFiles()
```

Get the list of associated files, if any.

**Returns**:

The list of files associated with this plug-in

**Return type**: IEnumerable\< string >

### Function SetAssociatedFiles

![][public]

```csharp theme={null}
void Phoenix.ModelCenter.PlugIn.ModelCenterHost.SetAssociatedFiles(params string[] files)
```

Set the associated files for the component.

**Parameters**:

* **files**: The list of files.

**Parameters**:

* params string\[] **files**

**Return type**: void

### Function SetAssociatedFiles

![][public]

```csharp theme={null}
void Phoenix.ModelCenter.PlugIn.ModelCenterHost.SetAssociatedFiles(ICollection< string > files)
```

Se the associated files for the component.

**Parameters**:

* **files**: The sequence of files.

**Parameters**:

* ICollection\< string > **files**

**Return type**: void

### Function CheckOutLicenseFeature

![][public]

```csharp theme={null}
IFeature Phoenix.ModelCenter.PlugIn.ModelCenterHost.CheckOutLicenseFeature(string featureName)
```

Check out the specified license feature.

**Parameters**:

* **featureName**: The name of the feature.

**Returns**:

The feature.

**Parameters**:

* string **featureName**

**Return type**: IFeature

### Function CheckOutLicenseFeature

![][public]

```csharp theme={null}
IFeature Phoenix.ModelCenter.PlugIn.ModelCenterHost.CheckOutLicenseFeature(string featureName, string releaseDate)
```

Check out the specified license feature.

**Parameters**:

* **featureName**: The name of the feature.
* **releaseDate**: The release date of the feature in yyyy.MMdd format.

**Returns**:

The feature.

**Parameters**:

* string **featureName**
* string **releaseDate**

**Return type**: IFeature

### Function RefreshFromModelCenter

![][public]

```csharp theme={null}
void Phoenix.ModelCenter.PlugIn.ModelCenterHost.RefreshFromModelCenter()
```

Read the variables from [ModelCenter](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2026-r1/modelcenter-plugin-md/namespacePhoenix_1_1ModelCenter.md) and cache locally.

**Return type**: void

### Function CommitVariableChanges

![][public]

```csharp theme={null}
void Phoenix.ModelCenter.PlugIn.ModelCenterHost.CommitVariableChanges()
```

Commit any changes in the variable list to [ModelCenter](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2026-r1/modelcenter-plugin-md/namespacePhoenix_1_1ModelCenter.md).

**Return type**: void

### Function AddVariable

![][public]

```csharp theme={null}
void Phoenix.ModelCenter.PlugIn.ModelCenterHost.AddVariable(PHXVariable v)
```

Add a new variable to the local list, which will not be committed.

There are two ways to create variables - set them all at once by setting [CurrentVariables](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1ad601297c405159628738ad5b97406793), or set them individually with [AddVariable](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1ab2ff5ff428477dd1ee0f8189c7989e52) then commit with [CommitVariableChanges](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a4ca0e3d227db7f3ec0a974cb51f6aab6). Do not mix and match

**Parameters**:

* **v**: The variable

**Parameters**:

* PHXVariable **v**

**Return type**: void

### Function GetValue

![][public]

```csharp theme={null}
string Phoenix.ModelCenter.PlugIn.ModelCenterHost.GetValue(string name)
```

Get the value of a variable. If the variable was just created individually, you will need to commit changes, because the variable won't exist yet in the model.

**Parameters**:

* **name**: The name of the variable.

**Returns**:

The value of the variable.

**Parameters**:

* string **name**

**Return type**: string

### Function GetRawValue

![][public]

```csharp theme={null}
string Phoenix.ModelCenter.PlugIn.ModelCenterHost.GetRawValue(string name)
```

Get the unmodified value of a variable. No formatting is done other than converting to a string. If the variable was just created individually, you will need to commit changes, because the variable won't exist yet in the model.

**Parameters**:

* **name**: The name of the variable.

**Returns**:

The value.

**Parameters**:

* string **name**

**Return type**: string

### Function SetValue

![][public]

```csharp theme={null}
void Phoenix.ModelCenter.PlugIn.ModelCenterHost.SetValue(PHXVariable v, string value)
```

Set the value of a variable. If the variable was just created individually, you will need to commit changes, because the variable won't exist yet in the model.

**Parameters**:

* **v**: The variable to set the value for.
* **value**: The value to set.

**Parameters**:

* PHXVariable **v**
* string **value**

**Return type**: void

### Function SetValue

![][public]

```csharp theme={null}
void Phoenix.ModelCenter.PlugIn.ModelCenterHost.SetValue(string name, string value)
```

Set a variable value. If the variable was just created individually, you will need to commit changes, because the variable won't exist yet in the model.

**Parameters**:

* **name**: The name of the variable.
* **value**: The value to set.

**Parameters**:

* string **name**
* string **value**

**Return type**: void

### Function GetHasChanged

![][public]

```csharp theme={null}
bool Phoenix.ModelCenter.PlugIn.ModelCenterHost.GetHasChanged(string name, bool reset=false)
```

Get whether the value of a variable has changed since the last time we reset the changed flag. If the variable was just created individually, you will need to commit changes, because the variable won't exist yet in the model.

**Parameters**:

* **name**: The name of the variable.
* **reset**: Whether the flag should be reset.

**Returns**:

True if yes, false if no.

**Parameters**:

* string **name**
* bool **reset** = false

**Return type**: bool

### Function ResetHasChanged

![][public]

```csharp theme={null}
void Phoenix.ModelCenter.PlugIn.ModelCenterHost.ResetHasChanged(string name)
```

Reset the changed flag on a variable. If the variable was just created individually, you will need to commit changes, because the variable won't exist yet in the model.

**Parameters**:

* **name**: The name of the variable.

**Parameters**:

* string **name**

**Return type**: void

### Function BringWindowToTop

![][public]

```csharp theme={null}
static bool Phoenix.ModelCenter.PlugIn.ModelCenterHost.BringWindowToTop(IntPtr hWnd)
```

Bring a window to the top.

**Parameters**:

* **hWnd**: The window handle.

**Returns**:

True on success, false on failure.

**Parameters**:

* IntPtr **hWnd**

**Return type**: bool

### Function BringModelCenterToTop

![][public]

```csharp theme={null}
void Phoenix.ModelCenter.PlugIn.ModelCenterHost.BringModelCenterToTop()
```

Bring the [ModelCenter](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2026-r1/modelcenter-plugin-md/namespacePhoenix_1_1ModelCenter.md) window to the top and activate it.

**Return type**: void

### Function AddIconToModelCenter

![][public]

```csharp theme={null}
short Phoenix.ModelCenter.PlugIn.ModelCenterHost.AddIconToModelCenter(Icon icon)
```

Load an icon in [ModelCenter](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2026-r1/modelcenter-plugin-md/namespacePhoenix_1_1ModelCenter.md). Uses a temporary file.

**Parameters**:

* **icon**: The icon to load.

**Returns**:

A unique index to the icon which can be used later.

**Parameters**:

* Icon **icon**

**Return type**: short

### Function SetGroupIcon

![][public]

```csharp theme={null}
void Phoenix.ModelCenter.PlugIn.ModelCenterHost.SetGroupIcon(string groupName, short iconID)
```

Set an icon for a group in [ModelCenter](https://developer.synopsys.com/docs/modelcenter/modelcenter-apis/2026-r1/modelcenter-plugin-md/namespacePhoenix_1_1ModelCenter.md).

**Parameters**:

* **groupName**: The name of the group.
* **iconID**: The icon ID, returned from [AddIconToModelCenter](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1a6f5205547369b30b1c5590f74d2abbbf).

**Parameters**:

* string **groupName**
* short **iconID**

**Return type**: void

### Function CreatePlugInFrame

![][public]

```csharp theme={null}
IntPtr Phoenix.ModelCenter.PlugIn.ModelCenterHost.CreatePlugInFrame(string name, string title, bool showFavorites, IComponentPlugIn plugin, Size initialSize, Size minSize)
```

Create a plugin frame to hold a plugin window.

**Parameters**:

* **name**: The name of the plugin.
* **title**: The window title.
* **showFavorites**: Whether to show favorites.
* **plugin**: The plugin object.
* **initialSize**: The initial size of the frame.
* **minSize**: The minimum size of the frame.

**Returns**:

The window handle of the frame.

**Parameters**:

* string **name**
* string **title**
* bool **showFavorites**
* IComponentPlugIn **plugin**
* Size **initialSize**
* Size **minSize**

**Return type**: IntPtr

### Function ShowPlugInFrame

![][public]

```csharp theme={null}
void Phoenix.ModelCenter.PlugIn.ModelCenterHost.ShowPlugInFrame(IntPtr hwnd)
```

Use this after creating a frame to ensure that it is shown.

**Parameters**:

* **hwnd**: The frame to show.

**Parameters**:

* IntPtr **hwnd**

**Return type**: void

### Function ReleasePlugInFrame

![][public]

```csharp theme={null}
void Phoenix.ModelCenter.PlugIn.ModelCenterHost.ReleasePlugInFrame(IntPtr hWnd)
```

Release the plug-in frame created by [CreatePlugInFrame](#classPhoenix_1_1ModelCenter_1_1PlugIn_1_1ModelCenterHost_1ab8a8a1ac37d0d10264c73eac9e0de479).

**Parameters**:

* **hWnd**: The frame window handle.

**Parameters**:

* IntPtr **hWnd**

**Return type**: void

## Private functions

### Function init

![][private]

```csharp theme={null}
void Phoenix.ModelCenter.PlugIn.ModelCenterHost.init()
```

**Return type**: void

### Function releaseMCVars

![][private]

```csharp theme={null}
void Phoenix.ModelCenter.PlugIn.ModelCenterHost.releaseMCVars()
```

**Return type**: void

### Function retrieveVariablesRecursive

![][private]

```csharp theme={null}
void Phoenix.ModelCenter.PlugIn.ModelCenterHost.retrieveVariablesRecursive(string prefix, object mcObject)
```

Retrieve variables from nested groups, recursively.

**Parameters**:

* **prefix**: The name prefix (previously-seen groups).
* **mcObject**: The component or group to search.

**Parameters**:

* string **prefix**
* object **mcObject**

**Return type**: void

### Function getVariableInternal

![][private]

```csharp theme={null}
IVariable Phoenix.ModelCenter.PlugIn.ModelCenterHost.getVariableInternal(string name)
```

**Parameters**:

* string **name**

**Return type**: IVariable

### Function setValueInternal

![][private]

```csharp theme={null}
void Phoenix.ModelCenter.PlugIn.ModelCenterHost.setValueInternal(IVariable var, PHXDataType type, string value)
```

**Parameters**:

* IVariable **var**
* PHXDataType **type**
* string **value**

**Return type**: void

### Function find

![][private]

```csharp theme={null}
object Phoenix.ModelCenter.PlugIn.ModelCenterHost.find(object mcObject, string name)
```

Retrieve a variable or group, recursively.

**Parameters**:

* **mcObject**: The component or group to search.
* **name**: The relative name to search for.

**Parameters**:

* object **mcObject**
* string **name**

**Return type**: object

### Function createPlugInFrame2

![][private]

```csharp theme={null}
IntPtr Phoenix.ModelCenter.PlugIn.ModelCenterHost.createPlugInFrame2(string name, string title, object plugin, bool showFavorites, Size initialSize, Size minSize)
```

**Parameters**:

* string **name**
* string **title**
* object **plugin**
* bool **showFavorites**
* Size **initialSize**
* Size **minSize**

**Return type**: IntPtr

### Function createPlugInFrame

![][private]

```csharp theme={null}
IntPtr Phoenix.ModelCenter.PlugIn.ModelCenterHost.createPlugInFrame(string name, string title, object plugin, bool showFavorites, Size initialSize)
```

**Parameters**:

* string **name**
* string **title**
* object **plugin**
* bool **showFavorites**
* Size **initialSize**

**Return type**: IntPtr

## Protected functions

### Function Dispose

![][protected]

```csharp theme={null}
override void Phoenix.ModelCenter.PlugIn.ModelCenterHost.Dispose(bool disposing)
```

Dispose of the COM objects immediately to avoid having to wait for garbage collection.

**Parameters**:

* **disposing**: Whether we are in the disposing phase

**Parameters**:

* bool **disposing**

**Return type**: override void

## Private static functions

### Function getGroups

![][private]
![][static]

```csharp theme={null}
static IGroups Phoenix.ModelCenter.PlugIn.ModelCenterHost.getGroups(object obj)
```

**Parameters**:

* object **obj**

**Return type**: IGroups

### Function getVariables

![][private]
![][static]

```csharp theme={null}
static IVariables Phoenix.ModelCenter.PlugIn.ModelCenterHost.getVariables(object obj)
```

**Parameters**:

* object **obj**

**Return type**: IVariables

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

[package]: https://img.shields.io/badge/-package-blueviolet "package"

[C#]: https://img.shields.io/badge/language-C%23-blue "C#"

[protected]: https://img.shields.io/badge/-protected-yellow "protected"

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

[static]: https://img.shields.io/badge/-static-lightgrey "static"
