问题:
VBA (Visual Basic for Applications) 的 AutoCAD 支持和下载说明。
解决方案:
VBA 7.1 在 Autodesk 产品中受支持,但它不再随 AutoCAD 默认安装,必须单独下载和安装。 如果您想在工作环境中利用 VBA 宏,则除非在系统上安装 VBA 模块,否则它们将不再起作用。 当您运行需要 VBA 的命令时,系统将显示一条消息指出 VBA 不再随 AutoCAD 一起安装,并将您转到一个网站,您可从中
下载 VBA 模块。
注意:
此网站上发布的 VBA 组件可用于 AutoCAD 以及 AutoCAD 行业特定版本支持的所有语言。
VBA 管理器和 VBA Enabler 是 VBA 模块的一部分。
部署 VBA
要在企业环境中部署 VBA 下载,您必须下载并解压缩 VBA Enabler,然后运行以下脚本:
' ----------------------------------------------------------------
' Scripted installation for VBA Enabler
option explicit
' define variables
dim shell
dim productType
dim strInstallLevel
dim strSourcePath
' Script initialization
Set shell = CreateObject("WScript.Shell")
productType = "BonusPack"
strInstallLevel=5 ' 5 installs everything, 3 installs typical
'
' Source to install from (如 Z:\install\Autodesk\ AcVbaInstallerInstall \CDROM1)
strSourcePath = "C:\Autodesk\AutoCAD_2010_VBA_Enabler_Install_Image\CDROM1"
'
RunStandaloneInstall()
Wscript.quit()
'
Function RunStandaloneInstall
shell.run DefaultCommand(),2,1
end a
'
Function DefaultCommand
dim retString
' /q for silent install ' /c [key] override parameters for the key
retString = """" & strSourcePath & "\setup.exe " & """" & " /t /q /c " & productType & ": "
retString = retString & "InstallLevel=" & strInstallLevel
DefaultCommand = retString
end a
'
' ----------------------------------------------------------------
另请参见:
CAD" target="_blank">无法下载适用于先前版本 AutoCAD 的 VBA Enabler
严重错误: VBA 无法正确初始化
如何将适用于 2014 - 2018 版的 VBA Enabler 添加到部署中
产品:
AutoCAD
版本:
,
问题:
VBA (Visual Basic for Applications) 的 AutoCAD 支持和下载说明。
解决方案:
VBA 7.1 在 Autodesk 产品中受支持,但它不再随 AutoCAD 默认安装,必须单独下载和安装。 如果您想在工作环境中利用 VBA 宏,则除非在系统上安装 VBA 模块,否则它们将不再起作用。 当您运行需要 VBA 的命令时,系统将显示一条消息指出 VBA 不再随 AutoCAD 一起安装,并将您转到一个网站,您可从中
下载 VBA 模块。
注意:
此网站上发布的 VBA 组件可用于 AutoCAD 以及 AutoCAD 行业特定版本支持的所有语言。
VBA 管理器和 VBA Enabler 是 VBA 模块的一部分。
部署 VBA
要在企业环境中部署 VBA 下载,您必须下载并解压缩 VBA Enabler,然后运行以下脚本:
' ----------------------------------------------------------------
' Scripted installation for VBA Enabler
option explicit
' define variables
dim shell
dim productType
dim strInstallLevel
dim strSourcePath
' Script initialization
Set shell = CreateObject("WScript.Shell")
productType = "BonusPack"
strInstallLevel=5 ' 5 installs everything, 3 installs typical
'
' Source to install from (如 Z:\install\Autodesk\ AcVbaInstallerInstall \CDROM1)
strSourcePath = "C:\Autodesk\AutoCAD_2010_VBA_Enabler_Install_Image\CDROM1"
'
RunStandaloneInstall()
Wscript.quit()
'
Function RunStandaloneInstall
shell.run DefaultCommand(),2,1
end a
'
Function DefaultCommand
dim retString
' /q for silent install ' /c [key] override parameters for the key
retString = """" & strSourcePath & "\setup.exe " & """" & " /t /q /c " & productType & ": "
retString = retString & "InstallLevel=" & strInstallLevel
DefaultCommand = retString
end a
'
' ----------------------------------------------------------------
另请参见:
CAD" target="_blank">无法下载适用于先前版本 AutoCAD 的 VBA Enabler
严重错误: VBA 无法正确初始化
如何将适用于 2014 - 2018 版的 VBA Enabler 添加到部署中
产品:
AutoCAD
评论