Skip to main content

IModel.SetInitField method

Namespace: NextDesign.Core

Description

Sets the specified field in this instance to the initial value of the field defined in the metamodel. If the metamodel does not specify an initial value for the field, set the default value for the field type.

If you call this method on a class-type owned field, the IModel that was set as the field value will be deleted. Also, if you call this method on a reference field of class type, the association with the IModel that was set as the field value will be removed (the IModel of the field value will be preserved without being deleted).

argument

NameTypeDescription
fieldNamestringField name
Null or an empty string cannot be specified.

Return value

  • void

Exception

NameException ClassDescription
Invalid argumentExtensionArgumentExceptionWhen null or an empty string is specified for fieldName
Field not foundExtensionFieldNotFoundExceptionIf the specified field is not found in the metaclass of this instance
Illegal operationExtensionInvalidOperationExceptionIf it is a deleted model or temporary proxy
If an inoperable field is specified in the field name
-Product line feature assignment field
-System. Fields with Core tags