Change the text size in the Styles Editor using VBA

Change the text size in the Styles Editor using VBA

shastu
Advisor Advisor
3,232 Views
20 Replies
Message 1 of 21

Change the text size in the Styles Editor using VBA

shastu
Advisor
Advisor

This should be so simple, but I can't figure out how to do it.  All I want to do is change the Text Height of "DEFAULT-ANSI" using VBA for the active drawing file.  See screenshot. 

 

Sub TextSize()

    ' Set a reference to the drawing document.
    ' This assumes a drawing document is active.
    Dim oDrawDoc As DrawingDocument
    Set oDrawDoc = ThisApplication.ActiveDocument

    ' Set a reference to the active sheet.
    Dim oActiveSheet As Sheet
    Set oActiveSheet = oDrawDoc.ActiveSheet

 

    ' Code to change the Text Height from 0.120 to .080. 

 

 

End Sub

0 Likes
Accepted solutions (1)
3,233 Views
20 Replies
Replies (20)
Message 21 of 21

A.Acheson
Mentor
Mentor

Go to all forums at the bottom of the page and navigate to Autocad. Here you will need to select which forum you want link here. Also if you perform an Internet search with VBA Autocad and the task you want you should get direct hits to the AutocadForum that involve coding and VBA. 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes