图框模版中加以下代码:
Sub CATColorGeometry()
SelectAll "..Name=Frame_Outside_Border_*" '选择名称为Frame_Outside_Border_*的图框线
CATIA.ActiveDocument.Selection.VisProperties.SetRealWidth 2,1 '设置选择图框线的线宽
CATIA.ActiveDocument.Selection.VisProperties.SetRealColor 128, 0, 128, 0 '设置选择图框线的颜色
CATIA.ActiveDocument.Selection.VisProperties.SetLayer catVisLayerBasic, 26 '设置选择图框线的图层
CATIA.ActiveDocument.Selection.VisProperties.SetPick catUnpickable '设置选择图框线的可拾取性
CATIA.ActiveDocument.Selection.clear '清除选择的图框线
End Sub
图框创建代码中加入中间那句代码
Sub CATDrw_Creation( targetSheet as CATIABase )
CATColorGeometry 'To change the geometry color
End Sub