API Reference > imodeljs-backend > Elements > ExternalSourceAttachment > createCode createCode MethodStatic Create a Code for an ExternalSourceAttachment element given a name that is meant to be unique within the scope of its parent ExternalSource. createCode(iModelDb: IModelDb, scopeElementId: string, codeValue: string): Code see ExternalSourceAttachment.ensureCodeSpec Parameter Type Description iModelDb IModelDb The IModelDb scopeElementId string The parent ExternalSource codeValue string The ExternalSourceAttachment name Returns - Code Defined in core/backend/src/ExternalSource.ts Line 109 Last Updated: 12 June, 2024