insert MethodStatic

Insert a DefinitionContainer and its sub-model.

insert(iModelDb: IModelDb, definitionModelId: string, code: Code, isPrivate?: boolean): string

note There is not a predefined CodeSpec for DefinitionContainer elements, so it is the responsibility of the domain or application to create one.

throws IModelError if there is a problem inserting the DefinitionContainer

Parameter Type Description
iModelDb IModelDb Insert into this IModelDb
definitionModelId string The Id of the DefinitionModel that will contain this DefinitionContainer element.
code Code The Code for this DefinitionContainer.
isPrivate boolean The optional hint, that if true means it should not be displayed in the UI.

Returns - string

The Id of the newly inserted DefinitionContainer and its newly inserted sub-model (of type DefinitionModel).

Defined in

Last Updated: 11 June, 2024