    

 ## On this page

  

 

 # Class SplineAPI

 Last update: 16.07.2025 

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

This class implements APIs for spline class.

```csharp
public static class SplineAPI

```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ← [SplineAPI](VM.API.Pre.SplineAPI.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

### CreateSpline(IDocument, string, IEnumerable&lt;Point&gt;, ExpressionValueVariable?, ExpressionValueVariable?, SymmetricType)

Create .

```csharp
[NotNull(new string[] { "document" })]
public static Obj CreateSpline(this IDocument document, string name, IEnumerable<SplineData.Point> splineData, ExpressionValueVariable? scaleX = null, ExpressionValueVariable? scaleY = null, SymmetricType symmetricType = SymmetricType.None)

```

#### Parameters

`document` IDocument

The document to create the spline.

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

The point X, Y of the spline.

`splineData` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;SplineData.Point&gt;

The density of the spline.

`scaleX` ExpressionValueVariable?

The X scale of spline.

`scaleY` ExpressionValueVariable?

The Y scale of spline.

`symmetricType` SymmetricType

The symmetric type of the new .

#### Returns

[Obj](VM.API.Pre.Obj.md)

The new  object that is created by this API.

#### Exceptions

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

Will be thrown if 'document', 'splineData' is null.

### CreateSpline3D(IDocument, string, ExpressionValueVariable\[,\], ExpressionValueVariable?, ExpressionValueVariable?, ExpressionValueVariable?, SymmetricType)

Create .

```csharp
[NotNull(new string[] { "document", "points" })]
public static Obj CreateSpline3D(this IDocument document, string name, ExpressionValueVariable[,] points, ExpressionValueVariable? scaleX = null, ExpressionValueVariable? scaleY = null, ExpressionValueVariable? scaleZ = null, SymmetricType symmetricType = SymmetricType.None)

```

#### Parameters

`document` IDocument

The document to create the spline3D.

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

The point X, Y of the spline3D.

`points` ExpressionValueVariable\[,\]

The points of the spline3D.

`scaleX` ExpressionValueVariable?

The X scale of spline3D.

`scaleY` ExpressionValueVariable?

The Y scale of spline3D.

`scaleZ` ExpressionValueVariable?

The Z scale of spline3D.

`symmetricType` SymmetricType

The symmetric type of the new .

#### Returns

[Obj](VM.API.Pre.Obj.md)

The new  object that is created by this API.

#### Exceptions

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

Will be thrown if 'document', 'points' is null.

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

Will be thrown if the count of the 'points' is less than 4.

### CreateSplineWithFile(IDocument, string, string, string, ExpressionValueVariable?, ExpressionValueVariable?, SymmetricType)

Create .

```csharp
[NotNull(new string[] { "document" })]
[NotNullOrEmpty(new string[] { "selectedSplineName" })]
[ExistFile(new string[] { "filePath" })]
public static Obj CreateSplineWithFile(this IDocument document, string name, string filePath, string selectedSplineName, ExpressionValueVariable? scaleX = null, ExpressionValueVariable? scaleY = null, SymmetricType symmetricType = SymmetricType.None)

```

#### Parameters

`document` IDocument

The document to create the spline.

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

The point X, Y of the spline.

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

The file path of the spline data.

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

The name of the selected spline.

`scaleX` ExpressionValueVariable?

The X scale of spline.

`scaleY` ExpressionValueVariable?

The Y scale of spline.

`symmetricType` SymmetricType

The symmetric type of the new .

#### Returns

[Obj](VM.API.Pre.Obj.md)

The new  object that is created by this API.

#### Exceptions

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

Will be thrown if 'document', 'selectedSplineName' is null.