remapTextStyleId MethodStatic

When copying an element from one iModel to another, returns the Id of the AnnotationTextStyle in the context's target iModel corresponding to sourceTextStyleId, or Id64.invalid if no corresponding text style exists. If a text style with the same Code exists in the target iModel, the style Id will be remapped to refer to that style. Otherwise, a copy of the style will be imported into the target iModel and its element Id returned. Implementations of ITextAnnotation should invoke this function when implementing their _onCloned method.

remapTextStyleId(sourceTextStyleId: string, context: IModelElementCloneContext): string

@throws Error if an attempt to import the text style failed.

Parameter Type Description
sourceTextStyleId string  
context IModelElementCloneContext  

Returns - string

Defined in

Last Updated: 07 October, 2025