使用 Autodesk Inventor 和 VBA 将 STEP 文件转换为 DWG

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3509935/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-11 12:00:12  来源:igfitidea点击:

Converting STEP files to DWG by using autodesk Inventor and VBA

vbaautodeskdwgstep

提问by oopbase

Does anyone know how to do that? My skills in using VBA aren't very good and I also googled for it, but I do not even know how to open one of those files by using VBA.

有谁知道这是怎么做到的吗?我使用 VBA 的技能不是很好,我也用谷歌搜索过,但我什至不知道如何使用 VBA 打开其中一个文件。

Maybe someone of you did already do something like this before?

也许你们中的某个人以前已经做过这样的事情?

Thanks a lot for any help.

非常感谢您的帮助。

EDIT

编辑

The following steps have to be done do convert the files:

必须完成以下步骤才能转换文件:

  1. Open the STEP file -> File -> Open
  2. Clicking on "Application" in the menu bar -> then "AEC-Exchange"
  3. Now there appears a dialog on the left called "AEC-Exchange" including the item: "Save as DWG". By clicking on it the file can be saved as an AutoCAD 2007 dwg file.
  1. 打开 STEP 文件 -> 文件 -> 打开
  2. 单击菜单栏中的“应用程序”-> 然后单击“AEC-Exchange”
  3. 现在,左侧会出现一个名为“AEC-Exchange”的对话框,其中包含项目:“另存为 DWG”。通过单击它,可以将文件另存为 AutoCAD 2007 dwg 文件。

I hope this helps.

我希望这有帮助。

采纳答案by Brandon Boone

EDIT

编辑

Apparently Autodesk Inventor can do the conversions for you natively. http://docs.autodesk.com/INVPRO/2010/ENU/Autodesk%20Inventor%202010%20Help/index.html?url=WS1a9193826455f5ffba22e1113c6c30c0e-3b1a.htm,topicNumber=d0e14826

显然 Autodesk Inventor 可以在本地为您进行转换。http://docs.autodesk.com/INVPRO/2010/ENU/Autodesk%20Inventor%202010%20Help/index.html?url=WS1a9193826455f5ffba22e1113c6c30c0e-3b1a.htm,topic8Number=d0e1

Open the .stp and save as .dwg? Also, it appears that this is the application that everyone references as being able to do it (At least going from .dwg to .stp). However, it also appears that .stp is a 3D file type while .dwg is a 2d file type. To me, it would seem that the .stp file type would contain data that the .dwg file couldn't handle since 3d is inherently more complex than 2d (unless these .stp files contain only 2d images?). This could explain why there aren't many articles on converting .stp to .dwg.

打开 .stp 并另存为 .dwg?此外,这似乎是每个人都认为能够做到的应用程序(至少从 .dwg 到 .stp)。但是,似乎 .stp 是 3D 文件类型,而 .dwg 是 2d 文件类型。对我来说,似乎 .stp 文件类型将包含 .dwg 文件无法处理的数据,因为 3d 本质上比 2d 更复杂(除非这些 .stp 文件只包含 2d 图像?)。这可以解释为什么关于将 .stp 转换为 .dwg 的文章并不多。



I've never used the Autodesk Inventor SDK and I'm not that great at VBA either, but there seems to be some pretty good documentation on it here: http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=1079044

我从来没有使用过 Autodesk Inventor SDK,我也不太擅长 VBA,但这里似乎有一些非常好的文档:http: //usa.autodesk.com/adsk/servlet/index?siteID =123112&id=1079044

Here are some of the resources I found on this page:

以下是我在此页面上找到的一些资源:

Intro Files / Inventor VBA(.ivb) Sample file:

介绍文件 / Inventor VBA(.ivb) 示例文件:

VBA & Inventor API Introduction (zip - 547Kb)The following resource will help you get started with programming Inventor. It assumes familiarity with Autodesk Inventor and general programming concepts.

VBA 和 Inventor API 介绍 (zip - 547Kb)以下资源将帮助您开始对 Inventor 进行编程。它假定您熟悉 Autodesk Inventor 和一般编程概念。

Video Tutorial:

视频教程:

DevTV: Introduction to Inventor Programming A self-paced video tutorial demonstrating how to get started developing with Autodesk Inventor. View online| Download

DevTV:Inventor 编程简介 一个自定进度的视频教程,演示如何开始使用 Autodesk Inventor 进行开发。 在线查看| 下载

Alternatively, if your only goal is to simply convert a .stp/.step file to .dwg. You may be better off finding some free converter over interfacing with Autodesk.

或者,如果您的唯一目标是简单地将 .stp/.step 文件转换为 .dwg。您最好找到一些免费的转换器而不是与 Autodesk 接口。