insert Method

Overloads
insert(codeSpec)  
insert(name, properties)  

insert(codeSpec)

Add a new CodeSpec to the iModel.

insert(codeSpec: CodeSpec): string

@returns The Id of the persistent CodeSpec.

@note If successful, this method will assign a valid CodeSpecId to the supplied CodeSpec

@throws IModelError if the insertion fails

Parameter Type Description
codeSpec CodeSpec The CodeSpec to insert

Returns - string

The Id of the persistent CodeSpec.



insert(name, properties)

Add a new CodeSpec to the IModelDb.

insert(name: string, properties: CodeSpecProperties | CodeScopeSpec.Type): string

@returns The Id of the persistent CodeSpec.

@throws IModelError if the insertion fails

Parameter Type Description
name string The name for the new CodeSpec.
properties CodeSpecProperties | CodeScopeSpec.Type The properties or the CodeSpec. For backwards compatibility this may also be a CodeScopeSpec.Type.

Returns - string

The Id of the persistent CodeSpec.


Defined in

Last Updated: 23 November, 2024