更好的 Autocad VBA 编辑器
我正在 Autocad 中开发一些 VBA 宏。内置编辑器已过时,但我无法找到任何更好的方法来编辑 .dvb
文件。
.dvb
文件确实包含许多其他打包的源文件,到目前为止,我认为 Autocad 是唯一可以解压它们的软件......
它似乎能够做到这一点的唯一方法,是手动导出 .dvb
中的每个文件;但由于我那里有大约 30 个文件,这似乎不是一个好方法。
关于如何做得更好有什么想法吗?
I'm developing some VBA macros in Autocad. The built-in editor is obsolete, but I wasn't able to find any better way to edit the .dvb
files.
A .dvb
file does contains many other source files packed in, and so far I think that Autocad is the only software that can unpack them...
The only way it seems to be able to do this, is to export every file from the .dvb
manually; but since I have about 30 files there, it doesn't seem like this is a good way to do things.
Any ideas on how to do this better?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用以下代码导出所有文件:
You can export all your files with this code :
如果您不想使用上述
Export()
子例程修改代码,可以使用 VBA2VB 表单由 Leslie Lowe 编写的 Converter 宏,或 修改版本由 Autodesk 开发者网络的 Augusto Gonçalves 编写。该宏的额外好处是能够将简单的 VBA 形式转换为 VB6 形式。如果您希望将来能够将项目移植到 .NET,则需要执行此操作,因为 AutoCAD 正在放弃 VBA 支持。宏的修改版本特别好,因为它将创建进行迁移所需的.vbproj
ASCII 文件,否则您需要旧版 Visual Basic 6 的副本IDE来制作。FWIW,如果您想查看其中的内容,可以使用 7-Zip 等存档实用程序打开
.dvb
文件 - 但它似乎已编译,如果您想查看它也没有帮助人类可读或可导出的代码。If you don't feel like modifying your code with the above
Export()
subroutine, you can export your VBA code from the.dvb
file using the VBA2VB Form Converter macro written by Leslie Lowe, or the modified version written by Augusto Gonçalves of the Autodesk Developer Network. This macro has the added bonus of being able to convert simple VBA forms to VB6 forms. You'll need to do this if you want to be able to port the project to .NET in the future, as AutoCAD is dropping VBA support. The modified version of the macro is especially nice, as it will create the.vbproj
ASCII file that you'll need to do the migration, which you'd otherwise need a copy of the old Visual Basic 6 IDE to make.FWIW, A
.dvb
file can be opened using an archive utility like 7-Zip, if you want to see what's in it -- but it appears to be compiled, and isn't helpful if you want human-readable or exportable code.