Share via


ElementFactory.CreateElement Method

Definition

Overloads

CreateElement(DomainClassInfo)

Create a new element instance of specified type.

CreateElement(Guid)

Create a new element instance of specified type.

CreateElement(DomainClassInfo, PropertyAssignment[])

Create a new element instance of specified type.

CreateElement(Guid, PropertyAssignment[])

Create a new element instance of specified type.

CreateElement(DomainClassInfo)

Create a new element instance of specified type.

public:
 Microsoft::VisualStudio::Modeling::ModelElement ^ CreateElement(Microsoft::VisualStudio::Modeling::DomainClassInfo ^ domainClass);
public Microsoft.VisualStudio.Modeling.ModelElement CreateElement (Microsoft.VisualStudio.Modeling.DomainClassInfo domainClass);
member this.CreateElement : Microsoft.VisualStudio.Modeling.DomainClassInfo -> Microsoft.VisualStudio.Modeling.ModelElement
Public Function CreateElement (domainClass As DomainClassInfo) As ModelElement

Parameters

domainClass
DomainClassInfo

Domain class of the object to be created.

Returns

The new element

Applies to

CreateElement(Guid)

Create a new element instance of specified type.

public:
 Microsoft::VisualStudio::Modeling::ModelElement ^ CreateElement(Guid domainClassId);
public Microsoft.VisualStudio.Modeling.ModelElement CreateElement (Guid domainClassId);
member this.CreateElement : Guid -> Microsoft.VisualStudio.Modeling.ModelElement
Public Function CreateElement (domainClassId As Guid) As ModelElement

Parameters

domainClassId
Guid

Domain class ID of the object to be created.

Returns

The new element

Applies to

CreateElement(DomainClassInfo, PropertyAssignment[])

Create a new element instance of specified type.

public:
 Microsoft::VisualStudio::Modeling::ModelElement ^ CreateElement(Microsoft::VisualStudio::Modeling::DomainClassInfo ^ domainClass, ... cli::array <Microsoft::VisualStudio::Modeling::PropertyAssignment ^> ^ propertyAssignments);
public Microsoft.VisualStudio.Modeling.ModelElement CreateElement (Microsoft.VisualStudio.Modeling.DomainClassInfo domainClass, params Microsoft.VisualStudio.Modeling.PropertyAssignment[] propertyAssignments);
member this.CreateElement : Microsoft.VisualStudio.Modeling.DomainClassInfo * Microsoft.VisualStudio.Modeling.PropertyAssignment[] -> Microsoft.VisualStudio.Modeling.ModelElement
Public Function CreateElement (domainClass As DomainClassInfo, ParamArray propertyAssignments As PropertyAssignment()) As ModelElement

Parameters

domainClass
DomainClassInfo

Domain class of the object to be created.

propertyAssignments
PropertyAssignment[]

List of property assignments to set immediately after element creation.

Returns

The new element

Applies to

CreateElement(Guid, PropertyAssignment[])

Create a new element instance of specified type.

public:
 Microsoft::VisualStudio::Modeling::ModelElement ^ CreateElement(Guid domainClassId, ... cli::array <Microsoft::VisualStudio::Modeling::PropertyAssignment ^> ^ propertyAssignments);
public Microsoft.VisualStudio.Modeling.ModelElement CreateElement (Guid domainClassId, params Microsoft.VisualStudio.Modeling.PropertyAssignment[] propertyAssignments);
member this.CreateElement : Guid * Microsoft.VisualStudio.Modeling.PropertyAssignment[] -> Microsoft.VisualStudio.Modeling.ModelElement
Public Function CreateElement (domainClassId As Guid, ParamArray propertyAssignments As PropertyAssignment()) As ModelElement

Parameters

domainClassId
Guid

Domain class ID of the object to be created.

propertyAssignments
PropertyAssignment[]

List of property assignments to set immediately after element creation.

Returns

The new element

Applies to