    

 ## On this page

  

 

 # Class TopologyAPI

 Last update: 16.07.2025 

Namespace: [VM.API.Pre](VM.API.Pre.md)  
Assembly: VM.API.Pre.dll

This class implements APIs for Topology.

```csharp
public static class TopologyAPI

```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ← [TopologyAPI](VM.API.Pre.TopologyAPI.md)

#### Extension Methods

[LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType)](VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkProperties_System_Object_VM_Models_Pre_LinkPropertyType_), [LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType)](VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkPropertiesAndValues_System_Object_VM_Models_Pre_LinkPropertyType_), [LinkPropertyItemCache.GetLinkedObjects&lt;T&gt;(object, LinkPropertyType)](VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkedObjects__1_System_Object_VM_Models_Pre_LinkPropertyType_)

## Methods

### ChangeEdgeColor(IDocument, IEnumerable&lt;Obj&gt;, Color?, SetColorType)

Change the topology edge.

```csharp
[NotNull(new string[] { "document", "edges" })]
public static void ChangeEdgeColor(this IDocument document, IEnumerable<Obj> edges, Color? color = null, SetColorType setColor = SetColorType.Set)

```

#### Parameters

`document` IDocument

The document to change the topology edge.

`edges` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[Obj](VM.API.Pre.Obj.md)&gt;

The edges of the topology.

`color` [Color](https://learn.microsoft.com/dotnet/api/system.drawing.color)?

The color of the topology.

`setColor` [SetColorType](VM.API.Pre.SetColorType.md)

The falg of color setting of the topology.

#### Exceptions

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

Will be thrown if 'document', 'edges' argument is null.

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

Will be thrown if the type of 'document' is not  and .

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

Will be thrown if the type of 'edges' is not .

### ChangeFaceColor(IDocument, IEnumerable&lt;Obj&gt;, Color?, SetColorType)

Change the topology face.

```csharp
[NotNull(new string[] { "document", "faces" })]
public static void ChangeFaceColor(this IDocument document, IEnumerable<Obj> faces, Color? color = null, SetColorType setColor = SetColorType.Set)

```

#### Parameters

`document` IDocument

The document to change the topology face.

`faces` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[Obj](VM.API.Pre.Obj.md)&gt;

The faces of the topology.

`color` [Color](https://learn.microsoft.com/dotnet/api/system.drawing.color)?

The color of the topology.

`setColor` [SetColorType](VM.API.Pre.SetColorType.md)

The falg of color setting of the topology.

#### Exceptions

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

Will be thrown if 'document', 'faces' argument is null.

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

Will be thrown if the type of 'document' is not  and .

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

Will be thrown if the type of 'faces' is not .