Language="VBSCRIPT"
Sub CATMain()
Set WshShell = CreateObject("WScript.Shell")
'Run the hta.
hta = "c:\Temp\E3source\CATVBS\your_file.hta"
WshShell.Run hta , 1, true
Set WshShell = Nothing
End Sub
运行exe文件
Sub CATMain()
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run("C:\temp\your_file.exe")
Set WshShell = Nothing
End Sub
要么
Sub CATMain()
call CATIA.SystemService.ExecuteBackGroundProcessus ("c:\Temp\your_file.exe")
End Sub
运行bat文件
Sub CATMain()
CATIA.SystemService.ExecuteProcessus "C:\Temp\your_file.bat"
End Sub
运行vbs文件
Language="VBSCRIPT"
Sub CATMain()
call CATIA.SystemService.ExecuteBackGroundProcessus("WScript.exe c:\CAT\copy_folder.vbs")
End Sub
1 回答
您始终可以创建CATScript / catvbs / catvba来在CATIA中调用您想要的内容(宏,应用程序......),并在工具栏上为这些“启动器”分配一个图标 .
下面的代码示例使用CATScript .
例如,运行一个hta文件 .
运行exe文件
要么
运行bat文件
运行vbs文件