[CONNECT VBA] Applying a Text Style from a dgnlib to an element during scan

I feel like I have done this before but can't get it to work for some reason.

I would like to scan a model for text elements and set the text style for each one found.

I have the scan etc working fine but can't apply the text style -

        'Change text style of sign names
        
        Do While oEnumerator.MoveNext
             
            Set oText = oEnumerator.Current

            Set oText.TextStyle = oFile.TextStyles("1.8mm BG")
                
            'oEnumerator.Current.Rewrite
            
            oText.Redraw msdDrawingModeNormal
            oText.Rewrite
            
            counter = counter + 1
         
        Loop

Any help would be appreciated.

Parents Reply Children