Skip to main content

IViewDefinitions.NewElementDef Method

Namespace: NextDesign.Core

Description

Creates an editor element definition for the specified model class.

Arguments

NameTypeDescription
editorIEditorDefEditor Definition
namestringEditor element definition name
modelClassIClassModel metaclass
typestringEditor element type
- "SimpleShape" : Simple shape
- "CompartmentShape" : Compartment shape
- "Port" : Port shape
- "ConnectorShape" : Connector shape
- "TextBox" : Text box
- "CheckBox" : Check box
- "ComboBox" : Combo box
- "List" : List
- "Grid" : Grid
- "ModelReferenceControl" : Model Reference Control
pathstringPath string of the corresponding metaclass
Specify null for elements that do not correspond to the field.
The default value is null.
parentIElementDefParent definition element
Specify null if you want to define it as an element directly under the editor definition.
The default value is null.

Return value

Exception

NameException classDescription
Invalid argumentExtensionArgumentExceptionIf the parameter is invalid
- Editor definition not specified
- Metaclass not specified
Invalid typeExtensionInvalidTypeExceptionIf an unsupported editor element type is specified
- An unsupported element type is specified in type
- The parameter specification conflicts with the type specified in type
Field not foundExtensionFieldNotFoundExceptionIf the field specified by the path was not found
Duplicate definitionExtensionDuplicationExceptionIf the view element definition name is duplicated