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

Namespace: [OpenTD.FloCAD](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.FloCAD)\
Assembly: OpenTD.dll

Client-side representation of a Compartment entity in a TD instance.

```csharp theme={null}
[DataContract]
public class Compartment : TdDbEntityData, IUpdatable
```

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[OpenTDObject](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.OpenTDObject.md) ←
[DbObject](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.DbObject.md) ←
[TdDbEntityData](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.TdDbEntityData.md) ←
[Compartment](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.FloCAD.Compartment.md)

## Implements

[IUpdatable](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.IUpdatable.md)

## Inherited Members

[TdDbEntityData.SetFrom(TdDbEntityData)](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.TdDbEntityData.md#setfrom-tddbentitydata),
[TdDbEntityData.Layer](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.TdDbEntityData.md#layer),
[TdDbEntityData.ColorIndex](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.TdDbEntityData.md#colorindex),
[TdDbEntityData.ToString(string, string, string)](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.TdDbEntityData.md#tostring),
[TdDbEntityData.ToString(string, int, string)](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.TdDbEntityData.md#tostring),
[TdDbEntityData.ToString()](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.TdDbEntityData.md#tostring),
[DbObject.SetFrom(DbObject)](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.DbObject.md#setfrom-dbobject),
[DbObject.Update()](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.DbObject.md#update),
[DbObject.UpdateFromTD()](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.DbObject.md#updatefromtd),
[DbObject.CreateIn(ThermalDesktop)](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.DbObject.md#createin-thermaldesktop),
[DbObject.Handle](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.DbObject.md#handle),
[DbObject.TypeName](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.DbObject.md#typename),
[DbObject.Equals(object)](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.DbObject.md#equals-object),
[DbObject.GetHashCode()](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.DbObject.md#gethashcode),
[OpenTDObject.SetFrom(OpenTDObject)](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.OpenTDObject.md#setfrom-opentdobject),
[OpenTDObject.Update()](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.OpenTDObject.md#update),
[OpenTDObject.UpdateFromTD()](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.OpenTDObject.md#updatefromtd),
[OpenTDObject.UpdateIn(ThermalDesktop)](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.OpenTDObject.md#updatein-thermaldesktop),
[OpenTDObject.CreateIn(ThermalDesktop)](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.OpenTDObject.md#createin-thermaldesktop),
[OpenTDObject.TdProxy](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.OpenTDObject.md#tdproxy),
[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring),
[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)),
[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)),
[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals),
[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode),
[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype),
[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone)

## Constructors

### Compartment()

```csharp theme={null}
public Compartment()
```

## Properties

### Bays

```csharp theme={null}
[DataMember]
public List<Bay> Bays { get; set; }
```

#### Property Value

[List](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)\<[Bay](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.FloCAD.Bay.md)>

### Comment

```csharp theme={null}
[DataMember]
public string Comment { get; set; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### CompartmentId

```csharp theme={null}
[DataMember]
public int CompartmentId { get; set; }
```

#### Property Value

[int](https://learn.microsoft.com/dotnet/api/system.int32)

### Enabled

```csharp theme={null}
[DataMember]
public int Enabled { get; set; }
```

#### Property Value

[int](https://learn.microsoft.com/dotnet/api/system.int32)

### EnabledExp

```csharp theme={null}
[DataMember]
public ExpressionData EnabledExp { get; set; }
```

#### Property Value

[ExpressionData](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.ExpressionData.md)

### LiquidColor

```csharp theme={null}
[DataMember]
public int LiquidColor { get; set; }
```

#### Property Value

[int](https://learn.microsoft.com/dotnet/api/system.int32)

### LumpHandle

```csharp theme={null}
public string LumpHandle { get; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### PackingFactor

```csharp theme={null}
[DataMember]
public double PackingFactor { get; set; }
```

#### Property Value

[double](https://learn.microsoft.com/dotnet/api/system.double)

### PackingFactorExp

```csharp theme={null}
[DataMember]
public ExpressionData PackingFactorExp { get; set; }
```

#### Property Value

[ExpressionData](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.ExpressionData.md)

### ShowIds

```csharp theme={null}
[DataMember]
public bool ShowIds { get; set; }
```

#### Property Value

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### ShowLV

```csharp theme={null}
[DataMember]
public int ShowLV { get; set; }
```

#### Property Value

[int](https://learn.microsoft.com/dotnet/api/system.int32)

### ShowLVExp

```csharp theme={null}
[DataMember]
public ExpressionData ShowLVExp { get; set; }
```

#### Property Value

[ExpressionData](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.ExpressionData.md)

### ShowSelectionRing

```csharp theme={null}
[DataMember]
public int ShowSelectionRing { get; set; }
```

#### Property Value

[int](https://learn.microsoft.com/dotnet/api/system.int32)

### ShowSelectionRingExp

```csharp theme={null}
[DataMember]
public ExpressionData ShowSelectionRingExp { get; set; }
```

#### Property Value

[ExpressionData](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.ExpressionData.md)

### Ties

```csharp theme={null}
[DataMember]
public List<CompartmentTie> Ties { get; set; }
```

#### Property Value

[List](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)\<[CompartmentTie](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.FloCAD.CompartmentTie.md)>

### TwinLump

```csharp theme={null}
[DataMember]
public int TwinLump { get; set; }
```

#### Property Value

[int](https://learn.microsoft.com/dotnet/api/system.int32)

### \_LumpHandle

Do not use.

```csharp theme={null}
[DataMember]
public string _LumpHandle { get; set; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

## Methods

### CreateIn(ThermalDesktop)

Creates the TD entity in the specified TD instance.

```csharp theme={null}
public override void CreateIn(ThermalDesktop td)
```

#### Parameters

`td` [ThermalDesktop](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.ThermalDesktop.md)

### ToString()

Returns a string that represents the current object.

```csharp theme={null}
public override string ToString()
```

#### Returns

[string](https://learn.microsoft.com/dotnet/api/system.string)

A string that represents the current object.

### Update()

Updates the TD entity with the latest client data.

```csharp theme={null}
public override void Update()
```

### UpdateFromTD()

Updates the client-side instance with the latest data from the TD entity.

```csharp theme={null}
public override void UpdateFromTD()
```

## See Also

[ThermalDesktop](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.ThermalDesktop.md)
