用CATScript 做的CATIA标题栏和工程图框 联系客服

发布时间 : 星期二 文章用CATScript 做的CATIA标题栏和工程图框更新完毕开始阅读374cfd264b35eefdc8d333a5

Col(5) = -156*mm Col(6) = -146*mm Col(7) = -140*mm Col(8) = -128*mm Col(9) = -116*mm Col(10) = -100*mm Col(11) = -93.5*mm Col(12) = - 87*mm Col(13) = -80.5*mm Col(14) = - 74*mm Col(15) = - 62*mm Col(16) = - 50*mm Row(1) = + 9*mm Row(2) = + 18*mm Row(3) = + 28*mm Row(4) = + 42*mm Row(5) = + 56*mm

Row(6) = + 38*mm 'revised

On Error Resume Next 'Rows

Set Line = Fact.CreateLine(OH + Col(1), OV , OH , OV )

Line.Name = \

Set Line = Fact.CreateLine(OH + Col(1), OV + Row(5), OH , OV + Row(5))

Line.Name = \

Set Line = Fact.CreateLine(OH +Col(10),OV + Row(1) , OH +Col(16) , OV + Row(1))

Line.Name = \

Set Line = Fact.CreateLine(OH +Col(10), OV + Row(2), OH , OV + Row(2))

Line.Name = \

Set Line = Fact.CreateLine(OH +Col(10), OV + Row(3), OH+Col(16) , OV + Row(3))

Line.Name = \

Set Line = Fact.CreateLine(OH + Col(16), OV + Row(6), OH , OV + Row(6))

Line.Name = \ For i=1 to Rows

Set Line = Fact.CreateLine(OH + Col(1), OV + (7*i), OH+ Col(10) , OV + (7*i))

Line.Name = \

Next 'Cols

Set Line = Fact.CreateLine(OH + Col(1), OV , OH + Col(1), OV + Row(5))

Line.Name = \

Set Line = Fact.CreateLine(OH , OV , OH , OV + Row(5))

Line.Name = \

Set Line = Fact.CreateLine(OH + Col(2), OV+ Row(3) , OH + Col(2), OV + Row(5))

Line.Name = \

Set Line = Fact.CreateLine(OH + Col(3), OV , OH + Col(3), OV + Row(3))

Line.Name = \

Set Line = Fact.CreateLine(OH + Col(4), OV+ Row(3) , OH + Col(4), OV + Row(5))

Line.Name = \

Set Line = Fact.CreateLine(OH + Col(5), OV , OH + Col(5), OV + Row(3))

Line.Name = \

Set Line = Fact.CreateLine(OH + Col(6), OV+ Row(3) , OH + Col(6), OV + Row(5))

Line.Name = \

Set Line = Fact.CreateLine(OH + Col(7), OV , OH + Col(7), OV + Row(3))

Line.Name = \

Set Line = Fact.CreateLine(OH + Col(8), OV , OH + Col(8), OV + Row(5))

Line.Name = \

Set Line = Fact.CreateLine(OH + Col(9), OV , OH + Col(9), OV + Row(5))

Line.Name = \

Set Line = Fact.CreateLine(OH +Col(10), OV , OH +Col(10), OV + Row(5))

Line.Name = \

Set Line = Fact.CreateLine(OH + Col(11), OV+ Row(1), OH + Col(11), OV + Row(2))

Line.Name = \

Set Line = Fact.CreateLine(OH + Col(12), OV+ Row(1), OH + Col(12), OV + Row(2))

Line.Name = \

Set Line = Fact.CreateLine(OH + Col(13), OV+ Row(1), OH + Col(13), OV + Row(2))

Line.Name = \

Set Line = Fact.CreateLine(OH + Col(14), OV+ Row(1), OH + Col(14), OV + Row(3))

Line.Name = \

Set Line = Fact.CreateLine(OH + Col(15), OV+ Row(1), OH + Col(15), OV + Row(3))

Line.Name = \

Set Line = Fact.CreateLine(OH + Col(16), OV , OH + Col(16), OV + Row(5))

Line.Name = \

If Err.Number <> 0 Then Err.Clear End If

On Error Goto 0 End Sub

Sub CATTitleBlockText()

'-------------------------------------------------------------------------------

'How to fill in the title block

'------------------------------------------------------------------------------- CATLinks

'The Left-down subBlock. Text_01 = \指导教师\ Text_02 = \审核\ Text_03 = \设计\ Text_04 = \张国建\ Text_05 = \ Text_06 = \标准化\ Text_07 = \签名)\ Text_08 = \年月日)\ Text_09 = \批准\ Text_001 = \

'The Left-up subBlock. Text_10 = \标记\ Text_11 = \处数\ Text_12 = \分区\

Text_13 = \更改文件号\ Text_14 = \签名)\ Text_15 = \年月日)\

'The Middle subblock

Text_16 = \共 张 第 张 \ Text_17 = \比例\ Text_18 = \重量\

Text_19= \阶 段 标 记\ Text_20 = \材料标记)\ 'The right subblock

Text_21 = \上海方宇工业设计\ Text_22 =\图样名称)\

Text_23 = \课程设计专用图纸\

'The Left-down subBlockText.

Set Text = DrwTexts.Add(Text_01 , OH + Col(1) , OV+1 ) CATFormatTBText

\

Set Text = DrwTexts.Add(\ \OH + Col(3) , OV+1 ) CATFormatTBText

\

Set Text = DrwTexts.Add(\ \OH + Col(5) + 3. , OV+1 ) CATFormatTBText

\

Set Text = DrwTexts.Add(Text_02 , OH + Col(1)+2 , OV + Rowwidth ) CATFormatTBText

\

Set Text = DrwTexts.Add(\Rowwidth ) CATFormatTBText

\

Set Text = DrwTexts.Add(\Rowwidth ) CATFormatTBText

\

Set Text = DrwTexts.Add(Text_03 , OH + Col(1) + 2. , OV + (Rowwidth*3) ) CATFormatTBText

\

Set Text = DrwTexts.Add(\(Rowwidth*2) ) CATFormatTBText \\

Set Text = DrwTexts.Add(Text_04 , OH + Col(3) + 1. , OV+