catia标题栏自动填写_catia图框标题栏宏代码(背景图框)

这段VBScript代码用于在Catia中自动绘制图框和标题栏,适用于V5R14版本。它创建Drafting文档,设置尺寸,定义坐标,并提供了调整标准时的水平和垂直平移。代码还包含了线条宽度的修改以及标题栏文字的定位。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

'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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值