CodeSpecs Class @preview

Manages CodeSpecs within an IModelDb

Methods

Name Description
constructor(imodel: IModelDb): CodeSpecs    
getById(codeSpecId: string): CodeSpec Look up a CodeSpec by Id.  
getByName(name: string): CodeSpec Look up a CodeSpec by name.  
hasId(codeSpecId: string): boolean Returns true if the IModelDb has a CodeSpec of the specified Id.  
hasName(name: string): boolean Returns true if the IModelDb has a CodeSpec of the specified name.  
insert(txn: EditTxn, codeSpec: CodeSpec): string Add a new CodeSpec to the iModel.  
insert(txn: EditTxn, name: string, properties: CodeScopeSpec.Type | CodeSpecProperties): string Add a new CodeSpec to the iModel.  
insert(codeSpec: CodeSpec): string Add a new CodeSpec to the iModel. Deprecated  
insert(name: string, properties: CodeScopeSpec.Type | CodeSpecProperties): string Add a new CodeSpec to the IModelDb. Deprecated  
load(id: string): CodeSpec Load a CodeSpec from the iModel  
queryId(name: string): string Look up the Id of the CodeSpec with the specified name.  
updateProperties(txn: EditTxn, codeSpec: CodeSpec): void Update the Json properties of an existing CodeSpec.  
updateProperties(codeSpec: CodeSpec): void Update the Json properties of an existing CodeSpec. Deprecated  

Defined in

Last Updated: 18 April, 2026