Fake dimension macro
Fake dimension macro
(OP)
Hello all,
Can anyone help me writing a simple macro to change a dimension to a rectangled fake dimension.
Thank you.
Can anyone help me writing a simple macro to change a dimension to a rectangled fake dimension.
Thank you.





RE: Fake dimension macro
CODE -->
Sub fake() Dim oDrawing As DrawingDocument Set oDrawing = CATIA.ActiveDocument Dim oSheets As DrawingSheets Set oSheets = oDrawing.Sheets Dim oSheet As DrawingSheet Set oSheet = oSheets.Item(1) Dim oView As DrawingView Set oView = oSheet.Views.Item(3) oView.Activate Set MyDimension = oView.Dimensions For i = 1 To MyDimension.Count Set ThisDrawingDim = MyDimension.Item(i) ThisDrawingDim.ValueFrame = catFraRectangle Dim MyValue As DrawingDimValue Set MyValue = ThisDrawingDim.GetValue MyValue.FakeDimType = catDimFakeNumValue 'catDimFakeText <--- switch this if you neet text MyValue.SetFakeDimValue 1, 2 * 25.4 ' "Fake" <--- switch this if you neet text Next i End Sub