1. 高分求catia宏命令文件批量重命名
Language="VBSCRIPT"
Dim dir_in as string
Dim dir_out as string
Dim Docs_Array(2000) as string
Dim Docs_Num as integer
'定义敏感的字符串,可扩充
'StrCount 与字符串大小相等
Dim StrCount as Integer
StrCount = 3
Dim StrSensitive(3) as string
StrSensitive(1) = "jiaozhengfangan"
'StrSensitive(2) = ""
'StrSensitive(3) = ""
'定义替换后的字符串
Dim StrResult(3) as string
StrResult(1) = ""
'StrResult(2) = ""
'StrResult(3) = ""
'定义装配件是否有错误链接的标志值
Dim linkError As Integer
linkError=0
'定义三维标注中的旗标的url的内容和位置
Dim url As String
url=""
Sub CATMain()
CATIA.DisplayFileAlerts = False
On Error Resume Next
Dim prompt as string
if( CATIA.Documents.count > 0 ) then
prompt = "There are some documents in CATIA Session!!" & chr(13)+chr(10)
prompt = prompt & chr(13)+chr(10) & "Please Close All opened Documents First !!"
msgbox prompt
exit sub
end if
msgbox chr(13)+chr(10) & " 文件转换前,请做好文件备份!!" & chr(13)+chr(10)
' ---------------------------------------------------------------------
dim FileSys as FileSystem
set FileSys = CATIA.FileSystem
Dim Exists As Boolean