    

 ## On this page

  

 

 # Class TopologyAPI

 Last update: 09.03.2026 

<a id="VM_API_Pre_TopologyAPI"></a>

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 ← [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

### <a id="VM_API_Pre_TopologyAPI_ChangeEdgeColor_VM_Models_Pre_IDocument_System_Collections_Generic_IEnumerable_VM_API_Pre_Obj__System_Nullable_System_Drawing_Color__VM_API_Pre_SetColorType_"></a> 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&lt;[Obj](VM.API.Pre.Obj.md)&gt;

The edges of the topology.

`color` Color?

The color of the topology.

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

The falg of color setting of the topology.

#### Exceptions

ArgumentNullException

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

ArgumentException

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

ArgumentException

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

### <a id="VM_API_Pre_TopologyAPI_ChangeFaceColor_VM_Models_Pre_IDocument_System_Collections_Generic_IEnumerable_VM_API_Pre_Obj__System_Nullable_System_Drawing_Color__VM_API_Pre_SetColorType_"></a> 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&lt;[Obj](VM.API.Pre.Obj.md)&gt;

The faces of the topology.

`color` Color?

The color of the topology.

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

The falg of color setting of the topology.

#### Exceptions

ArgumentNullException

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

ArgumentException

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

ArgumentException

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