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

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

This class implements APIs to create patch set.

```csharp theme={null}
public static class PatchSetAPI
```

#### Inheritance

object ←
[PatchSetAPI](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.API.Pre.FE.PatchSetAPI.md)

#### 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_)

## Methods

### CreatePatchset(MeshDocument, IEnumerable\<Patch>, string, ExpressionValueVariable?, ExpressionValueVariable?, SurfaceSmoothing, Color?)

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

```csharp theme={null}
[NotNull(new string[] { "document", "patchIndexes" })]
public static Obj CreatePatchset(this MeshDocument document, IEnumerable<Patch> patchIndexes, string name = "", ExpressionValueVariable? maxPenetration = null, ExpressionValueVariable? offset = null, SurfaceSmoothing surfaceSmoothing = SurfaceSmoothing.AUTOMATIC, Color? color = null)
```

#### Parameters

`document` MeshDocument

The document to create patch set.

`patchIndexes` IEnumerable\<Patch>

The patch indexes.

`name` string

The name to be cteated patch set.

`maxPenetration` [ExpressionValueVariable](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/Pre/Data/VM.Models.Pre/Models/ExpressionValueVariable.cs)?

The maximum penetration to be cteated patch set. The default value is 0.

`offset` [ExpressionValueVariable](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/Pre/Data/VM.Models.Pre/Models/ExpressionValueVariable.cs)?

The offset to be cteated patch set. The default value is 1.

`surfaceSmoothing` SurfaceSmoothing

The surface smoothing to be cteated patch set. The default value is AUTOMATIC.

`color` Color?

The color to be cteated patch set. The default value is Violet.

#### Returns

[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The new [SetPatch](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.FE.SetPatch.md) object that is created by this API.

#### Exceptions

ArgumentNullException

Will be thrown if 'document' or 'patchIndexes' arguments are empty.
