发布时间 : 星期二 文章用CATScript 做的CATIA标题栏和工程图框更新完毕开始阅读374cfd264b35eefdc8d333a5
\
Set Text = DrwTexts.Add(\ \, OH + Col(15) , OV+(Row(1)+3) ) CATFormatTBText
\
Set Text = DrwTexts.Add(Text_18 , OH + Col(14) + 2. , OV +(Row(2)+3) ) CATFormatTBText
\
Set Text = DrwTexts.Add(\, OH + Col(14) + 2. OV+(Row(1)+3) ) CATFormatTBText
\ Set Text = DrwTexts.Add(Text_19 , OH + Col(10) + 1. , +(Row(2)+3) ) CATFormatTBText
\
Set Text = DrwTexts.Add(\, OH + Col(10) + 1. OV+(Row(1)+2) ) CATFormatTBText
\
Set Text = DrwTexts.Add(\OH + Col(11) + 1. , OV+(Row(1)+2) ) CATFormatTBText
\
Set Text = DrwTexts.Add(\OH + Col(12) + 1. , OV+(Row(1)+2) ) CATFormatTBText
\
Set Text = DrwTexts.Add(\OH + Col(13) + 1. , OV+(Row(1)+2) ) CATFormatTBText
\ Set Text = DrwTexts.Add(Text_20 , OH + Col(10) + 25. , +(Row(3)+5) ) CATFormatTBText
\ 'The right subblockText. Set Text = DrwTexts.Add(Text_21 , OH + Col(16) +25. , +Row(4) ) CATFormatTBText
\ Set Text = DrwTexts.Add(Text_22 , OH + Col(16) +25. , +(Row(2)+5) )
OV OV OV OV , , CATFormatTBText
\ Set Text = DrwTexts.Add(Text_23 , OH + Col(16) +25. , OV +5 ) CATFormatTBText
\
End Sub
Sub CATTitleObjBlockFrame()
'-------------------------------------------------------------------------------
'How to draw the title Objblock geometry
'------------------------------------------------------------------------------- Coll(1) = -180*mm Coll(2) = -172*mm Coll(3) = -134*mm Coll(4) = -90*mm Coll(5) = - 82*mm Coll(6) = - 44*mm Coll(7) = - 34*mm Coll(8) = - 24*mm
Rowl(1) = + 56*mm Rowl(2) = + 63*mm Rowl(3) = + 70*mm
For i=1 to ObjAmount Rowl(i+3)= + (70+7*i)*mm Next
'MsgBox \ On Error Resume Next
'creat TitleObjBlock RowlLines . Set Line = Fact.CreateLine(OH + Coll(6), OV +Rowl(2) , OH+ Coll(8) , OV + Rowl(2) )
Line.Name = \ Set Line = Fact.CreateLine(OH + Coll(1), OV +Rowl(3) , OH , OV + Rowl(3) )
Line.Name = \
For i=1 to ObjAmount
Set Line = Fact.CreateLine(OH + Coll(1), OV +Rowl(i+3) , OH , OV + Rowl(i+3))
Line.Name = \ DrawingDimLine.thickness=1 Next
'creat TitleObjBlock CollLines .
Set Line = Fact.CreateLine(OH + Coll(8), OV +Rowl(1) , OH+ Coll(8) , OV + Rowl( ObjAmount+3) ) Line.Name = \ Set Line = Fact.CreateLine(OH + Coll(7), OV +Rowl(2) , OH+ Coll(7) , OV + Rowl( ObjAmount+3) ) Line.Name = \ Set Line = Fact.CreateLine(OH + Coll(6), OV +Rowl(1) , OH+ Coll(6) , OV + Rowl( ObjAmount+3) ) Line.Name = \ Set Line = Fact.CreateLine(OH + Coll(5), OV +Rowl(1) , OH+ Coll(5) , OV + Rowl( ObjAmount+3) ) Line.Name = \ Set Line = Fact.CreateLine(OH + Coll(4), OV +Rowl(1) , OH+ Coll(4) , OV + Rowl( ObjAmount+3) ) Line.Name = \ Set Line = Fact.CreateLine(OH + Coll(3), OV +Rowl(1) , OH+ Coll(3) , OV + Rowl( ObjAmount+3) ) Line.Name = \ Set Line = Fact.CreateLine(OH + Coll(2), OV +Rowl(1) , OH+ Coll(2) , OV + Rowl( ObjAmount+3) ) Line.Name = \ Set Line = Fact.CreateLine(OH + Coll(1), OV +Rowl(1) , OH+ Coll(1) , OV + Rowl( ObjAmount+3) ) Line.Name = \
If Err.Number <> 0 Then Err.Clear End If
On Error Goto 0
End Sub
Sub CATTitleObjBlockText()
'-------------------------------------------------------------------------------
'How to fill in the title Objblock.
'----------------------------------------------------------------------------
Text_01 = \序\ Text_02 = \号\
Text_03 = Chr(15) +\代 号\
Text_04 = Chr(15) +\名 称\ Text_05 = \数\ Text_06 = \量\
Text_07 = Chr(20) +\材 料\ Text_08 = \单件\ Text_09 = \总计\
Text_10 = Chr(10) +\重量(Kg)\ Text_11 = Chr(15) +\备 注\ TextO_01 = \ TextO_02 = \ TextO_03 = \ TextO_04 = \ TextO_05 = \ TextO_06 = \ TextO_07 = \ TextO_08 = \
Set Text = DrwTexts.Add(Text_01, OH + Coll(1) + 4. , OV + (Rowl(2)+3) ) CATFormatTBText
\
Set Text = DrwTexts.Add(Text_02, OH + Coll(1) + 4. , OV + (Rowl(1)+3) ) CATFormatTBText
\
Set Text = DrwTexts.Add(Text_03, OH + Coll(2) + 4. , OV + (Rowl(1)+3) ) CATFormatTBText \catBottomLeft , 5
Set Text = DrwTexts.Add(Text_04, OH + Coll(3) + 4. , OV + (Rowl(1)+3) ) CATFormatTBText \ catBottomLeft , 5
Set Text = DrwTexts.Add(Text_05, OH + Coll(4) + 4. , OV + (Rowl(2)+3) )
, ,