    

 ## On this page

  

 

 # Class MeshDocumentAPI

 Last update: 16.07.2025 

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

This class implements APIs for  class.

```csharp
public static class MeshDocumentAPI

```

#### Inheritance

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

### CreateNewMeshDocument(string, string, Unit, double)

Create .

```csharp
[NotNullOrEmpty(new string[] { "newMeshFilePath" })]
public static MeshDocument CreateNewMeshDocument(string newMeshFilePath, string documentName = "Mesh", Unit unit = null, double iconSize = 1)

```

#### Parameters

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

The file path of new mesh.

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

The name of document.

`unit` Unit

The unit information.

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

The size of icon.

#### Returns

MeshDocument

The new SubSystemDocument object that is created by this API.

#### Exceptions

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

Will be thrown if 'newMeshFilePath' argument is empty.

### ImportMesh(MeshDocument, string, string, Color?, bool, bool)

Import external mesh file such as bdf/dat into the

```csharp
[NotNull(new string[] { "doc" })]
[ExistFile(new string[] { "feDataFilePath" })]
public static Obj ImportMesh(this MeshDocument doc, string feDataFilePath, string modalDataFileName = "", Color? meshColor = null, bool degenerateElement = false, bool modalOnly = false)

```

#### Parameters

`doc` MeshDocument

The  to import external mesh file.

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

The path to the external mesh file.

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

The path to the modal data file.

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

The  of the new mesh,

`degenerateElement` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

The flag for degenerate element.

`modalOnly` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

The flag for modal only.

#### Returns

Obj

The new  object.

#### Exceptions

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

Will be thrown when doc or feDataFilePath is null,

[FileNotFoundException](https://learn.microsoft.com/dotnet/api/system.io.filenotfoundexception)

Will be thrown if feDataFilePath file is not exist.