Skip to main content

Motion Standalone Preprocessor C# library 2024 R2

Class CreateAPI

Last update: 16.07.2025

Namespace: VM.API.Pre
Assembly: VM.API.Pre.dll

This class implements APIs for create entity class.

public static class CreateAPI

Inheritance

object ← CreateAPI

Extension Methods

LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType), LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType), LinkPropertyItemCache.GetLinkedObjects<T>(object, LinkPropertyType)

Methods

Create<T>(IDocument, string, Func<string, T>)

Create Entity.

[NotNull(new string[] { "document" })]
[NotNullOrEmpty(new string[] { "name" })]
public static T Create<T>(this IDocument document, string name, Func<string, T> funcCreate)

Parameters

document IDocument

The document to create the entity.

name string

The name of the entity.

funcCreate Func<string, T>

The customized create function.

Returns

T

The new entity that is created by this API.

Type Parameters

T

The entity type

Exceptions

ArgumentNullException

Will be thrown if 'document' or 'name' arguments are null.

Connect with Ansys