导入和导出 CAD 文件
PRO If you're a SketchUp Pro user, you can import or export CAD files, which use the .dwg or .dxf file formats.
Before you import a file, it's helpful to know what CAD entities SketchUp Pro does and doesn't support and how to prepare your CAD file for best results.然后,您可以完成本文中概述的基本导入步骤。 After you're done importing, check out Starting with a CAD File in SketchUp Pro, which offers several tips and tricks for handling imported CAD geometry.
如果您要将 SketchUp Pro 文件导出为 CAD 格式,则导入 CAD 文件的方式取决于它是 2D 文件(例如平面图)还是 3D 模型。 In this article, you also discover how SketchUp data is exported into CAD format.
目录
Understanding what CAD elements SketchUp can import
Preparing a CAD file for import into SketchUp
Importing a CAD file into SketchUp
Understanding how SketchUp data is exported to CAD format
Exporting a SketchUp Model as a 2D CAD file
Exporting a SketchUp Model as a 3D CAD file
Understanding what CAD elements SketchUp can import
The following table outlines what CAD elements SketchUp does and doesn't support. If an element isn't supported, SketchUp simply ignores it when you import the CAD file.
Supported CAD Entities
不受支持的 CAD 实体
Arcs
Proprietary ADT or ARX objects

方面
Entities with thickness
孵化
面孔
文本
3D faces
XREFs
图层
Lines and supported Line Styles
材料
基于折线的实体
Nested blocks
AutoCAD regions
观点
椭圆
样条
RasterImage
准备要导入 SketchUp 的 CAD 文件
当您在导入前采取几个步骤检查和准备 CAD 文件时,可以确保将所需的所有数据导入 SketchUp 并简化导入过程。 The following sections outline what you need to look for and how to resolve any potential conflicts between CAD elements and SketchUp.
Tip: You don't want to lose details in your original CAD file.请记住创建 CAD 文件的副本并准备将该副本导入 SketchUp。
Change unsupported elements
If you need to import unsupported CAD elements into SketchUp, try exploding those elements in CAD so they become primitive CAD drawing elements that SketchUp does support.
For example, when you explode CAD objects into block entities, they import into SketchUp as components. If you explode the CAD block entities into polylines, the polylines import into SketchUp as lines or polylines.
删除不必要的图层
在导入的 CAD 文件中,SketchUp 会自动丢弃任何与 3D 无关的实体,例如文本、尺寸、影线等。 However, SketchUp won't discard the layers holding these entities. To avoid a bunch of empty layers in SketchUp, you may want to purge any unused layers through Statistics on the Model Info dialog.
Move geometry close to the origin
In SketchUp, geometry that's many miles or kilometers away from the origin (0,0) can cause performance problems.为避免这些问题,请在将 CAD 文件导入 SketchUp 之前检查几何图形在 CAD 文件中的位置。
For example, say you're importing Autodesk AutoCAD DWG files, such as civil site plans, in order to work with the contour lines. If the graphic or geometry is far away from the origin, move it close to the origin before importing the CAD file into SketchUp.
Alternatively, deselect the Preserve Drawing Origin option in SketchUp's DWG/DXF import options, as explained in Importing a CAD file into SketchUp, later in this article.
Reduce the file size if needed
Generally, CAD files import into SketchUp successfully when the file size is 15MB or less.导入较大的 CAD 文件时,导入可能需要很长时间或可能会失败。 Conversely, the smaller your CAD file size, the quicker and easier the import. Also, after a complex CAD file is imported into SketchUp, you may notice that SketchUp's performance slows down. That's because lines and faces in SketchUp contain more data than their CAD equivalents.
Tip: For best results with imported CAD files, keep the size of imported files to a minimum.以下是在将 CAD 文件导入 SketchUp 之前最小化 CAD 文件的一些提示:
Import only the necessary geometry. SketchUp models can be designed to be as accurate as models in CAD. However, SketchUp is not designed for the same type of line-intensive drawings done in CAD software. In your CAD file, clean up or remove any content that you don't need to use after you import the CAD file into SketchUp. You might simplify the CAD file to just walls — and maybe doors and windows if you want to model those in your SketchUp file, too.
不同 CAD 文件之间的不同细节级别。 If your CAD file holds lots of necessary geometry, consider whether you break one file into a few smaller files. For example, one imported CAD file can contain site plan information, another can have a floor plan, and a final file can have a specific detail.
检查措施单位
如果可能,请找出用于创建CAD文件的度量单位。当您将CAD文件导入Sketchup时,您需要知道您的文件是使用英寸,脚还是测量单位。这样,您可以将Sketchup模型的单元与CAD文件的单位匹配,从而维护导入的CAD几何形状的规模和尺寸。
在 SketchUp 2018 及更高版本中,您还可以选择使用 CAD 文件中指定的单位导入模型。在单位下拉列表中,从列表中选择模型单元,该单元告诉Sketchup尝试匹配保存在CAD文件中的单元。如果 SketchUp 无法确定用于创建 CAD 文件的测量单位,则在 SketchUp 中默认为 1 CAD 单位等于 1 英寸。
以与 SketchUp 兼容的 CAD 文件格式保存
当Sketchup导入CAD文件时,Sketchup将信息剥离到其基本几何组件。因此,无论您使用哪种AutoCAD文件格式(例如2013年或2018年),最终结果基本相同。为了最大化CAD文件和Sketchup之间的兼容性,将CAD文件保存在版本13或版本14格式中最有效。
将CAD文件导入Sketchup
检查并准备好CAD文件后,您可以将其导入Sketchup。以下步骤将引导您完成操作系统的导入过程:
在Sketchup中,打开要导入.dwg或.dxf文件的Sketchup模型。
选择文件>导入。出现一个导入对话框。
导航您的硬盘驱动器保存的位置。
从类型下拉列表的文件中,选择AutoCAD文件( *.dwg, *.dxf)。
选择要导入的文件。
单击选项按钮。如下图所示,出现了导入的AutoCAD DWG/DXF选项对话框。
(可选)在几何区域中,为以下选项选择您的首选项:选择合并共面面以告诉 SketchUp 自动从平面中删除三角线。选择一致地定向面框告诉 SketchUp 分析导入面的方向并定向面使他们的方向是统一的。
(可选)选择“保护图”原点复选框以将导入的几何形状放置在.dwg或.dxf文件中定义的原点。如果要将导入的几何图形放在Sketchup Origin附近,请将复选框取消选择。
(可选)要以正确的比例导入几何形状,请从单位下拉列表中选择CAD文件中使用的单元。您的选择是型号单元,英寸,脚,码,里程,毫米,厘米,米和千里。 SketchUp 中的英寸。或者使用大单位类型,例如英尺或米。然后,您可以在导入之后根据需要调整大小的大小。Warning:如果选择一个小型单元,例如毫米,但是该模型最初是旨在以脚显示的,您可以无意间创建会在导入时丢失的Itty bitty Faces 。要让 SketchUp 识别人脸,人脸必须为 0.001 平方英寸或更大。
单击“导入AutoCAD DWG/DXF选项”对话框中的确定。
返回“导入”对话框,单击“导入”按钮,然后Sketchup Pro开始导入您的CAD文件。
提示:在使用“ sketchup for Sketchup的导出”功能创建的布局文件时,请使用合并Coplanar Faces选项进行清洁导入的面孔。提示:您还可以将可导入的文件拖放到图纸区域中。删除文件后,任何相关的导入对话框都会打开,因此您可以选择所需的选项。

>

提示:如果您在Adobe Illustrator(.EPS)文件中具有平面图或其他向量图形,则可以将.EPS文件导出到Illustrator中的.dwg或.dxf格式。然后按照前面的步骤导入向量图形。如果在Adobe Illustrator中,您首先减少定义曲线的锚点数量,则可以在SketchUp中提高文件的性能。特别是,当您从包含大量线段的曲线中挤出面时,SketchUp 文件的大小会显着增加。
了解如何将Sketchup数据导出到CAD格式
在将Sketchup模型导出到CAD文件格式(.dwg或.dxf)之前,您可能会发现有助于了解如何将Sketchup数据转换为您选择的CAD格式。以下是您需要了解的内容:
Sketchup面被导出为带有内部splframe隐藏线的三角测得的polyface网格(如果适用)。这种转换有助于模拟 SketchUp 文件的外观,即使所有导出的面都是三角形的。
SketchUp 使用在“模型信息”对话框的“单位”窗格中设置的当前单位作为转换为 .dwg 或 .dxf 文件的参考。例如,如果当前的模型信息单元设置为十进制和仪表,则必须将AutoCAD设置为十进制,以使其单元正确翻译为在AutoCAD中打开导出的文件时,将其作为仪表正确地翻译为仪表。
重复线实体不是在P线实体之上创建的。
将Sketchup模型导出为2D CAD文件
将模型视图导出为2D CAD文件时,您可以选择刻度和许多行选项。结果是您可以在CAD程序中打开的.dwg或.dxf格式的2D矢量文件。
请按照以下步骤导出2D CAD文件:
要将模型的比例保持在导出的文件中,请在Sketchup中选择摄像头>并行投影。然后通过选择相机 > 标准视图并从出现的子菜单中选择一个选项,将您的视图设置为 SketchUp 的标准视图之一。 (有关模型视图选项的详细信息,请参阅查看模型。)
选择文件 > 导出 > 2D 图形。
导航到您要保存导出文件的地方。
(可选)如果您想将“导出文件”命名以外的其他内容,则更改文件名。
选择.dwg或.dxf文件类型。在Microsoft Windows中,从保存为类型下拉列表中选择此选项。在 Mac 上,使用“格式”下拉列表。
单击选项按钮以设置刻度和行选项,并在即将到来的列表中详细说明。完成后,单击“ DWG/DXF隐藏线”选项对话框(Microsoft Windows)或“导出选项”对话框(Mac OS X)中的确定。
单击导出,您的 CAD 文件将保存在您选择的位置。
在下图中,您可以看到当前操作系统的“线路选项”对话框。以下列表介绍了您的选项,以便导出文件中的行满足您的需要:



AutoCAD版本:选择要使用哪种版本的AutoCAD打开导出的文件。
绘图比例尺和大小:默认情况下选择完整的比例复选框。但是,如果您取消选择该复选框,则可以设置自定义秤。在绘图框中,键入要设置比例的实际测量值。在“在模型中”框中,键入用于缩放导出模型的值。例如,对于1:4的比例,在型号框中键入1',在绘图框中4'。
配置文件线:在这里,您可以自定义如何出现在导出文件中的配置文件。您可以按如下方式设置线宽:选择“无”以标准宽度导出轮廓线。选择“带宽度的多段线”以将轮廓线导出为 AutoCAD 多段线。选择此选项时,您可以将自动选择留下,以便导出线与配置文件线宽度匹配。如果取消选择自动,则可以在宽度框中输入自定义宽度。选择宽线实体将配置文件线导出为AutoCAD Wide Line实体。
默认情况下选择的图层复选框上的单独的复选框为配置文件边缘创建了图层。如果您使用 SketchUp 图层来控制可见性,请注意,当您将 SketchUp 文件导出为 2D CAD 文件时,SketchUp 图层分配不会直接转换。
截面行:如果您导出部分行或部分切片,则这些导出选项可用。有关部分以及如何导出它们的详细信息,请参阅将模型切片以对等内部。
边缘扩展:某些CAD应用程序在模型使用Sketchup Line扩展名时,可能会在识别行端点和交叉点上遇到问题。取消选择“显示扩展”复选框以切换导出文件中的扩展名。如果您将所选的显示扩展名留下并取消选择自动复选框,则可以在长度框中输入确切的长度长度。
在 Microsoft Windows 中,如果您想在导出 2D CAD 文件时在此对话框中设置选项,则可以选择始终提示隐藏线选项。您还可以通过单击默认按钮来还原默认设置。
将Sketchup模型导出为3D CAD文件
当您将 SketchUp 模型导出为 3D CAD 文件时,您可以选择要导出的实体。要导出您的模型,请按照以下步骤:
在Sketchup中,选择文件>导出> 3D模型。出现“导出模型对话框”。
导航到您要保存导出文件的位置。
(可选)如果愿意,请更改文件名。默认情况下,导出的文件使用与 SketchUp 文件名相同的名称。
选择.dwg或.dxf作为导出文件的文件格式。在 Microsoft Windows 中,从“另存为类型”下拉列表中选择您的文件类型。在Mac OS X中,使用格式下拉列表。
单击选项按钮以打开“导出选项”对话框,如下图所示。从AutoCAD版本下拉列表中,选择要使用的AutoCAD版本来打开导出的文件。在导出区域中,为要在导出文件中包含的每种类型的实体选择复选框。完成后单击确定。
返回“导出型号”对话框,单击导出,然后您的文件出现在您选择保存的位置中。



提示:使用.dwg格式的材料出口和导入材料,以更好地互操作性和工作流程。