Complete the code to create a new text style named 'TitleStyle'.
style = acad.ActiveDocument.TextStyles.Add('[1]')
We use the exact name 'TitleStyle' to create the new text style.
Complete the code to set the font of the text style to 'Arial'.
style.FontFile = '[1]'
The FontFile property should be set to 'Arial' to match the requirement.
Fix the error in the code to set the text height to 2.5.
style.Height = [1]The text height must be a numeric value 2.5 without quotes or commas.
Fill both blanks to set the text style to be italic and bold.
style.Italic = [1] style.Bold = [2]
Both Italic and Bold properties are boolean and should be set to True to enable them.
Fill all three blanks to save the style and apply it to the active document.
style.Update() acad.ActiveDocument.ActiveTextStyle = [1] acad.ActiveDocument.Regen([2]) print('Style applied:', [3].Name)
We update the style, set it as active, regenerate the document with True, and print the style name.
