Hi there,
I'm trying to change the dimension text size for a drawing with, in first instance, a recorded macro who looks like: See below.
When I run the macro the font size didn't change on the drawing however when I check the document properties the size is changed in the value given in the macro.
Rebuilding the document won't make any changes.
The code looks fine to me and the API help describes the same procedure.
What do I need to change to take effect ?
Anyone ?
Greetings !
--------------------------------------------------------------------------------
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Dim myTextFormat As Object
Set myTextFormat = Part.Extension.GetUserPreferenceTextFormat(swUserPreferenceTextFormat_e.swDetailingDimensionTextFormat, swUserPreferenceOption_e.swDetailingDimension)
myTextFormat.CharHeightInPts = 16
boolstatus = Part.Extension.SetUserPreferenceTextFormat(swUserPreferenceTextFormat_e.swDetailingDimensionTextFormat, swUserPreferenceOption_e.swDetailingDimension, myTextFormat)
End Sub
--------------------------------------------------------------------------------