1

I would like to change the font name and font size of all dimensions in the drawing.
I tried to select dimensions using this code: (dimensions are selected, but I don't know how to enter the font name and font size change)

Set oDrwDoc = CATIA.ActiveDocument
Set oSheets = oDrwDoc.Sheets
Set oSheet = oSheets.ActiveSheet
Set oViews = oSheet.Views
For vc = 3 To oViews.Count 'scan all views for dimensions except main view and background views
    Set oView = oSheet.Views.Item(vc)
    oView.Activate
    Set oDims = oView.Dimensions
    For dc = 1 To oDims.Count
        Set oDim = oDims.Item(dc)
        Set oDimVal = oDim.GetValue
        oDim.SetFontName 0, 0, "Monospac821 BT"
    Next 'dc
Next 'vc
Community
  • 1
  • 1
Matis_RnK
  • 15
  • 5

1 Answers1

1

I have the same problem and I use EKL to modify them. EKL has this option.

let oDim (DrwDimension)

oDim.FontName =  "Arial (TrueType)"
oDim.FontSize = 3
Community
  • 1
  • 1
mansu kim
  • 15
  • 3