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

Namespace: [VM.Operations.Post.Interfaces](https://developer.synopsys.com/docs/motion/motion-standalone-postprocessor-c-sharp-library/2025-r1/lib/VM.Operations.Post.Interfaces)\
Assembly: VM.Operations.Post.dll

Represents a view in the application, providing functionalities to manage and interact with views.

```csharp theme={null}
public interface IView : IOperationsBase
```

#### Implements

[IOperationsBase](https://developer.synopsys.com/docs/motion/motion-standalone-postprocessor-c-sharp-library/2025-r1/lib/VM.Operations.Post.Interfaces.IOperationsBase.md)

## Properties

### FullName

Gets or sets the name of the view.

```csharp theme={null}
string FullName { get; set; }
```

#### Property Value

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

#### Examples

The following example demonstrates how to use the `FullName` property:

```csharp theme={null}
applicationHandler = new ApplicationHandler();
document = applicationHandler.GetDocument("result file path");
dynamicAnalysis = document.GetAnalysisResultViewModel(AnalysisResultType.Dynamics);
page = applicationHandler.GetPage("page1");
view = page.CreateAnimation(dynamicAnalysis, "ResultAnimation");
view.FullName = "Animation2";
```

#### Remarks

The FullName property provides a simple way to manage the name of a view.
It is a read-write property, meaning it can be both retrieved and modified.
This property is typically used in scenarios where the view's name is needed for display, logging, or processing purposes.

### GroupID

Gets the ID of the page that the current view belongs to.

```csharp theme={null}
Guid GroupID { get; }
```

#### Property Value

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

#### Examples

The following example demonstrates how to use the `GroupID` property:

```csharp theme={null}
applicationHandler = new ApplicationHandler();
document = applicationHandler.GetDocument("result file path");
dynamicAnalysis = document.GetAnalysisResultViewModel(AnalysisResultType.Dynamics);
page = applicationHandler.GetPage("page1");
view = page.CreateAnimation(dynamicAnalysis, "ResultAnimation");
applicationHandler.AddPage("page2");
findpage = applicationHandler.GetPage(view.GroupID);
findpage.Activate()
```

#### Remarks

The GroupID property provides the ID of the page to which the current view belongs.
This property is read-only and is set when the view is associated with a page. It allows for identifying the parent page of a view.

### GroupName

Gets or sets the name of the page that the current view belongs to.

```csharp theme={null}
string GroupName { get; set; }
```

#### Property Value

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

#### Examples

The following example demonstrates how to use the `GroupName` property:

```csharp theme={null}
applicationHandler = new ApplicationHandler();
document = applicationHandler.GetDocument("result file path");
dynamicAnalysis = document.GetAnalysisResultViewModel(AnalysisResultType.Dynamics);
page = applicationHandler.GetPage("page1");
view = page.CreateAnimation(dynamicAnalysis, "ResultAnimation");
view.GroupName = "page2";
```

#### Remarks

The GroupName property allows getting or setting the name of the page to which the current view belongs.
When accessed, it retrieves the name of the parent page. When set, it updates the name of the parent page, allowing the name of the page to be changed from the context of the current view.

### ID

Gets the unique identifier of the view.

```csharp theme={null}
int ID { get; }
```

#### Property Value

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

#### Examples

The following example demonstrates how to use the `ID` property:

```csharp theme={null}
applicationHandler = new ApplicationHandler();
document = applicationHandler.GetDocument("result file path");
dynamicAnalysis = document.GetAnalysisResultViewModel(AnalysisResultType.Dynamics);
page = applicationHandler.GetPage("page1");
view = page.CreateAnimation(dynamicAnalysis, "ResultAnimation");
findview = page.GetView(view.ID)
```

#### Remarks

The ID property provides the unique identifier for the view.
This identifier is generated at the time of the view's creation and remains constant for the lifetime of the view.
The property is read-only and ensures each view can be uniquely identified.

### ViewType

Gets the type of the view, indicating whether it is an Animation or Chart type.
Supported view types include:
<ul><li>Animation</li><li>Chart</li></ul>

```csharp theme={null}
ViewType ViewType { get; }
```

#### Property Value

ViewType

#### Examples

The following example demonstrates how to use the `ViewType` property:

```csharp theme={null}
applicationHandler = new ApplicationHandler();
document = applicationHandler.GetDocument("result file path");
dynamicAnalysis = document.GetAnalysisResultViewModel(AnalysisResultType.Dynamics);
page = applicationHandler.GetPage("page1");
view = page.CreateAnimation(dynamicAnalysis, "ResultAnimation");
```

#### Remarks

The ViewType property provides information about the type of the view.
It indicates whether the view is an Animation type or a Chart type.
This can be useful when searching for specific types of views within a page.
The available options are:
<ul><li>Animation</li><li>Chart</li></ul>

## Methods

### Activate()

Activates the view.

```csharp theme={null}
void Activate()
```

#### Examples

The following example demonstrates how to use the `Activate` method:

```csharp theme={null}
applicationHandler = new ApplicationHandler();
document = applicationHandler.GetDocument("result file path");
dynamicAnalysis = document.GetAnalysisResultViewModel(AnalysisResultType.Dynamics);
page = applicationHandler.GetPage("page1");
view = page.CreateAnimation(dynamicAnalysis, "ResultAnimation");
view.Activate();
```

#### Remarks

The Activate method is used to activate the selected view.
When this method is called, it deactivates any currently active views within the same page and sets the selected view as the only active view.
There can be only one active view at a time.

### DockTo(DockLayout, IView)

Moves the view to a specified position relative to another view.

```csharp theme={null}
void DockTo(DockLayout dockLayout, IView target)
```

#### Parameters

`dockLayout` DockLayout

Specifies the position where the current view should be docked relative to the target view.
The available options are:
<ul><li>Left</li><li>Top</li><li>Right</li><li>Bottom</li></ul>

`target` [IView](https://developer.synopsys.com/docs/motion/motion-standalone-postprocessor-c-sharp-library/2025-r1/lib/VM.Operations.Post.Interfaces.IView.md)

The view relative to which the current view will be docked.

#### Examples

The following example demonstrates how to use the `DockTo` method:

```csharp theme={null}
applicationHandler = new ApplicationHandler();
document = applicationHandler.GetDocument("result file path");
dynamicAnalysis = document.GetAnalysisResultViewModel(AnalysisResultType.Dynamics);
page = applicationHandler.GetPage("page1");
currentView = page.CreateAnimation(dynamicAnalysis, "ResultAnimation");
targetView = page.CreateChart("ChartView");
currentView.DockTo(DockLayout.Top, targetView);
```

#### Remarks

The DockTo() method is used to move the current view to a new position relative to another view.
The position is specified using the `dockLayout` parameter, which determines the direction (Top, Bottom, Left, Right)
where the current view will be docked in relation to the target view.

### ExportImage(string, ImageFormat, double?, double?)

Exports the image to the specified file path in the specified format.

```csharp theme={null}
void ExportImage(string filepath, ImageFormat format, double? width = null, double? height = null)
```

#### Parameters

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

The path where the image file will be saved.

`format` ImageFormat

The format in which the image will be saved. Supported formats are Png, Jpeg, and Bmp.
The available options are:
<ul><li>Bmp</li><li>Jpeg</li><li>Png</li></ul>

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

The optional width for the exported image. If not specified, the original width is used.

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

The optional height for the exported image. If not specified, the original height is used.

#### Examples

The following example demonstrates how to use the `ExportImage` method:

```csharp theme={null}
applicationHandler = new ApplicationHandler();
document = applicationHandler.GetDocument("result file path");
dynamicAnalysis = document.GetAnalysisResultViewModel(AnalysisResultType.Dynamics);
page = applicationHandler.GetPage("page1");
currentView = page.CreateAnimation(dynamicAnalysis, "ResultAnimation");
currentView.ExportImage("image.png", ImageFormat.Png, 1920, 1080);
```

#### Remarks

This method allows you to export an image to a desired file path in a specified format. Supported formats are
Png, Jpeg, and Bmp. You can also specify the desired dimensions for the exported image. If width or height is
not provided, the original dimensions of the image will be used.
