1 year ago

#275464

test-img

Matis_RnK

CATIA VBA - how to change font size and name of selected dimensions in drawing

I would like to ask if it is possible 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

vba

fonts

dimension

catia

0 Answers

Your Answer

Accepted video resources