API Reference > imodeljs-backend > Relationships > ElementRefersToElements > insert insert MethodStatic Insert a new instance of the Relationship. insert<T extends ElementRefersToElements>(iModel: IModelDb, sourceId: Id64String, targetId: Id64String): Id64String Parameter Type Description iModel IModelDb The iModel that will contain the relationship sourceId Id64String The sourceId of the relationship, that is, the driver element targetId Id64String The targetId of the relationship, that is, the driven element Returns - Id64String The Id of the inserted Relationship. Defined in core/backend/src/Relationship.ts Line 97 Last Updated: 13 June, 2024