'COPYRIGHT DASSAULT SYSTEMES 2001
' ****************************************************************************
' Purpose: To draw a Frame and TitleBlock
' Assumptions: A Drafting document should be active
' Author: 彭阳国
' Languages: VBScript--catia automation
' Version: V5R14
' Release:
' #2011-7-20 by 16969
' ****************************************************************************
Public DrwDocument As DrawingDocument
Public DrwSheets As DrawingSheets
Public DrwSheet As DrawingSheet
Public DrwView As DrawingView
Public DrwTexts As DrawingTexts
Public Text As DrawingText
Public Fact As Factory2D
Public Point As Point2D
Public Line As Line2D
Public Circle As Circle2D
Public Selection As Selection
Public GeomElems As GeometricElements
Public Height As Double 'Sheet height
Public Width As Double 'Sheet width
Public Offset As Double 'Distance between the sheet edges and the frame borders
Public OH As Double 'Horizontal origin for drawing the titleblock
Public OV As Double 'Vertical origin for drawing the titleblock
Public Col(20) As Double 'Columns coordinates
Public Row(18) As Double 'Rows coordinates
Public colRev(4) As Double 'Columns coordinates of revision block
Public TranslationX As Double 'Horizontal translation to operate when changing standard
Public TranslationY As Double 'Vertical translation to operate when changing standard
Public displayFormat As String 'Sheet format according to standard
Public sheetFormat As catPaperSize 'Sheet format as integer value
'new variable
Public RowWidth As Double 'Sheet width
Public ObjAmount As Double
Public Coll(8) As Double 'Collumns coordinates
'Const MaxDetailSec as Integer = 53 '明细栏的最大数量
'Public Rowl(53) As Double 'Rowls coordinates ObjAmount=i+3
'end
Const MaxDetailSec = 53
Dim Rowl()as Double
Const mm = 1
Const Inch = 254
Const RulerLength = 200
Const MacroID = "Drawing_Titleblock_JUNJIE"
Const RevRowHeight = 10
' Add by 16969
' Used to change the width of lines
Dim oSel as Selection
Dim OVisProps as VisPropertySet
Const FatLine as Long = 2 ' the fat line number of the line width defined in XML configration file.
Const FineLine as Long = 1 ' the fine line number of the line width defined in XML configration file
' Sheet Background view's name
Const SheetBackground as String = "Background View"
' 字符串字符的间隔比例
Const CharSpacing as Integer = 10
' 字符串字符的比率值, 注意: 仅支持Catia中的矢量字体, TrueType字体无效.
Const CharRatio as Integer = 85
Sub CATMain()
CATInit
On Error Resume Next
Name = DrwTexts.GetItem("Refer