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

Namespace: [VM.Managed.DAFUL.Pre](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.Pre)\
Assembly: dfpredat.dll

This class is to represent the work.

```csharp theme={null}
public class Work : FileGroup<Work.WorkGroup, GroupItem>, IFileGroup, IWorkGroup
```

#### Inheritance

object ←
[Group\<Work.WorkGroup, GroupItem>](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.Pre.Group-2.md) ←
[FileGroup\<Work.WorkGroup, GroupItem>](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.Pre.FileGroup-2.md) ←
[Work](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.Pre.Work.md)

#### Implements

[IFileGroup](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.Pre.IFileGroup.md),
[IWorkGroup](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.Pre.IWorkGroup.md)

#### Inherited Members

[FileGroup\<Work.WorkGroup, GroupItem>.Path](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.Pre.FileGroup-2.md#VM_Managed_DAFUL_Pre_FileGroup_2_Path),
[Group\<Work.WorkGroup, GroupItem>.Initialize()](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.Pre.Group-2.md#VM_Managed_DAFUL_Pre_Group_2_Initialize),
[Group\<Work.WorkGroup, GroupItem>.Name](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.Pre.Group-2.md#VM_Managed_DAFUL_Pre_Group_2_Name),
[Group\<Work.WorkGroup, GroupItem>.SubGroups](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.Pre.Group-2.md#VM_Managed_DAFUL_Pre_Group_2_SubGroups),
[Group\<Work.WorkGroup, GroupItem>.SubItems](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.Pre.Group-2.md#VM_Managed_DAFUL_Pre_Group_2_SubItems)

#### Extension Methods

[LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkProperties_System_Object_VM_Models_Pre_LinkPropertyType_),
[LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkPropertiesAndValues_System_Object_VM_Models_Pre_LinkPropertyType_),
[LinkPropertyItemCache.GetLinkedObjects\<T>(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkedObjects__1_System_Object_VM_Models_Pre_LinkPropertyType_)

## Constructors

### Work()

Initializes a new instance of the [Work](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.Pre.Work.md) class.

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

### Work(string)

Initializes a new instance of the [Work](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.Pre.Work.md) class.

```csharp theme={null}
public Work(string strFileName)
```

#### Parameters

`strFileName` string

Name of the file.

### Work(string, bool)

Initializes a new instance of the [Work](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.Pre.Work.md) class.

```csharp theme={null}
public Work(string strFileName, bool IsSettingCurrent)
```

#### Parameters

`strFileName` string

Name of the file.

`IsSettingCurrent` bool

if set to `true` \[is setting current].

## Properties

### CurrentWork

Gets or sets the current work.

```csharp theme={null}
public static Work CurrentWork { get; }
```

#### Property Value

[Work](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.Pre.Work.md)

### CurrentWorkPath

Gets or sets the current work path.

```csharp theme={null}
public static string CurrentWorkPath { get; set; }
```

#### Property Value

string

### SubModels

Gets or sets the sub models.

```csharp theme={null}
public List<Model> SubModels { get; set; }
```

#### Property Value

List\<[Model](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.Pre.Model.md)>

## Methods

### AddModel(Model)

Adds the model in work.

```csharp theme={null}
public bool AddModel(Model model)
```

#### Parameters

`model` [Model](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.Pre.Model.md)

The new model.

#### Returns

bool

`true` if success; otherwise, `false`.

### ClearCurrentWork()

Clear the current work.

```csharp theme={null}
public static void ClearCurrentWork()
```

### GetActiveModel(string)

Gets the active model.
If model has active item, it is active.

```csharp theme={null}
public Model GetActiveModel(string strItemPath)
```

#### Parameters

`strItemPath` string

The item path.

#### Returns

[Model](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.Pre.Model.md)

The active model.

### GetActiveModelFromDirectory(string)

Gets the active model from directory.

```csharp theme={null}
public Model GetActiveModelFromDirectory(string strItemDirectory)
```

#### Parameters

`strItemDirectory` string

The STR item directory.

#### Returns

[Model](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.Pre.Model.md)

### GetAllModels()

Gets all models.

```csharp theme={null}
public List<Model> GetAllModels()
```

#### Returns

List\<[Model](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.Pre.Model.md)>

The Models

### GetModel(string)

Gets the model.

```csharp theme={null}
public Model GetModel(string strModelName)
```

#### Parameters

`strModelName` string

Name of the model.

#### Returns

[Model](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.Pre.Model.md)

### GetModelNameList()

Gets the model name list.

```csharp theme={null}
public List<string> GetModelNameList()
```

#### Returns

List\<string>

The name of models.

### Initialize()

Initializes this instance.

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