Virtual Construction – Importing DWG drawings to sketchup.

(by Tomas Machnikowski)

When importing DWG and DXF drawings into Sketchup, a lot of the information goes missing in the process (e.g. text, hatches, dimensions, symbols, etc). The objective of this tutorial is to illustrate how to fix this problem.

As an example, we’ll work with the drawing in Figure 1.


Figure 1. Screen capture of a detail drawing in AutoCAD

Let’s select our detail and export it with the EXPORT command (Menu —> File —> Export —> Block*.dwg) We’ll call it “DETAIL.DWG” and we’ll specify its “Insertion Point” in the lower left-hand corner when prompted by AutoCAD.

In Sketchup, in the main menu we’ll select: File —> Import —> AutoCAD files *.dwg, *.dxf. Let’s choose our file “DETAIL.DWG,” and hit Escape button right after the detail loads into Sketchup in order to exit the “move” mode that Sketchup puts us in automatically.

Depending on the Sketchup version and Style settings, our detail should look similar to the image below, which, clearly, is quite different from the AutoCAD display.



Let’s have a closer look at what happened:

1. First off, we don’t have a need for the human figure – select it and hit DELETE.

2. The lines are all black, and we’d rather have them colored per our AutoCAD colors. Actually, if we look in the Layer Window (Main Menu —> Window —> Layers), we’ll see that Sketchup did create multiple layers and colored them per the AutoCAD line colors. So, the colors are there, but they are not displaying correctly.

3. Many of the detail elements are missing, notably all the text, dimensions and hatch patterns.

4. The lines look thick and are collapsing into smeared black swaths.

5. Lines are extending past the intersecting end points.

6. The whole detail seems somewhat elevated above the green/red axis, i.e. it doesn’t sit flat at the 0,0,0 origin point.

7. Something funny is going on with the curtain wall window frame (upper/left corner). It is floating, separated from the rest of the detail.

We’ll work our way through the above issues. First off, let’s go to the Layers window and change our display to “Color by layer” as illustrated in the image below:




Next, let’s open the Styles Window (Main Menu —> Window —> Styles), select the “Edit” tab and click on the “Edge Settings” icon, as illustrated in the image below. Let’s choose the “By material” option. Now the lines in our detail should change their appearance from black to colors consistent with those  in AutoCAD.


Let’s keep the Styles Window open. We’ll tweak a few more things. We’ll make the lines finer and crisper, and we’ll prevent them from running past the intersecting end points. Also, we’ll change the background display to black, per the AutoCAD display.

Let’s follow the sequence of selections per the images below. In “Styles Window”, select the” Edit” tab, click on the “Edge Settings” icon, and un-check everything but “Edges”. This display mode has the added benefit of making things easier on your computer system. Our model should display faster as a result


To change the background color, go to “Styles Window”, click on the “Edit” tab and select the “Background Settings” icon. Change the “Background” color to a desired value. Un-check “Sky” and “Ground” (4).


Let’s have a look at the remaining problems.

One of the key reasons for importing a DWG drawing into sketchup is to use it as a template for tracing faces and extruding them into three-dimensional objects, such as window frames, plywood sheathing, etc. As a pre-condition, our drawing has to be clean, the lines should be straight and they need to meet at a point without gaps. Rigorous drafting techniques will go a long way here and we will save ourselves many frustrating moments in modeling in sketchup.

Even then, however, what otherwise might appear as a neatly laid out drawing in a two-dimensional space….


…becomes a disjointed-looking mess in three dimensions.

This is significant, as we won’t be able to efficiently construct a 3D model out of such lines.

There are a couple of ways to address this problem:


1. We could do an internet search and find a Sketchup plug-in that would allow is to flatten a selected set of lines. One such plug-in is called “Flatten to Plane.” It requires us to draw and select a WorkPlane onto which a set of lines is then projected.

2. We could flatten our detail in AutoCAD before importing it into Sketchup.  The Express Tools in Autocad come with “Flatten” command. It works best with lines, polylines, circles, etc, dimensions, leaders, BUT it doesn’t handle hatches and a few other element types.

The “SuperFlatten” lisp command is also available for download off the internet, and it does seem to work better than “flatten.”

Neither command particularly likes mirrored objects. And you may encounter other quirky behaviors, so experiment on a copy of your AutoCAD file.

Whichever “flattening” method we use, we want our imported detail to look something like this:


Spin the view around to make sure that all lines appear flat and positioned in plane.

Now onto a few other issues. If we look back to the image above and compare it to the very first image presented in this tutorial, we’ll see elements such as hatches, text, dimensions, etc are absent from the Sketchup view.

We’ll need to go back to our AutoCAD file and further process our detail before exporting it again for Sketchup use. Let’s make sure that we are with a copy of our AutoCAD file, as the changes we are about to make will be irreversible.

We’ll use the following set of AutoCAD commands to process our DWG file:

EXPLODE – explodes blocks, dimensions, Mtext, leaders, hatches

BURST – converts attributes in blocks to text before exploding them

TXTEXP – converts Mtext and Text to lines (Exploded text is placed on the current layer, rather than the layer where it was originally located)

INSUNITS – set Insunits to “0,” otherwise the TXTEXP command may not work as expected (You could find that the exploded text scales up or down and floats off somewhere into space.)

Let’s see how the EXPLODE command works. InAutoCAD, select the detail and type “X,” a shortcut for “EXPLODE.” We should get something similar to this:


Upon closer inspection, we’ll notice that the hatches have been exploded into dots and lines (1). The dimensions (2) have been exploded into text and lines. Most notably, the block with attributes has been exploded to text and lines, but the value of the text (3) has not been preserved (we get “0X” rather than “F1a” as it was before the EXPLODE command). The BURST command will address this problem. As stated earlier, it will preserve the text value of the block attribute before exploding/bursting it.

As far as hatches go, in most cases, it’s best to leave them out of your sketchup model. Once exploded, hatches will comprise a huge number of lines and points that might considerable slow down your computer and increase the file size.


Let’s look now at the TXTEXP (text explode) command. Let’s remember to set the INSUNITS value to “0”. We’ll now select all the text to be exploded, and we’ll then zoom into the smallest of the text. And, upon executing the TXTEXP command, we should get this:
The exploded text looks fairly well defined, and it remains in its original position, BUT it now resides on the current layer, rather on its original layer.

If we hadn’t zoomed into our text before exploding it, as recommended, we would have ended up with jagged, sometimes illegible lines:


For previously stated reasons, it’s best not to include hatches and dimensions in the imported detail file. On the other hand, information such as spot elevations, structural beam sizes, etc will be a handy, immediately accessible reference, as we construct our 3d model.

It will also become apparent that in the process of importing our DWG file, we lost dashed line styles. Currently, there isn’t a clear work-around to this problem in Sketchup. We could change the colors of all the dashed/hidden lines to light/dark grey for example so that they don’t interfere visually with continuous lines. The Skethcup plugin “2D TOOLS” allows for some limited functionality and could be used to convert continuous lines to dashes. This could prove useful for presentation purposes, but is probably not critical for our 3d construction needs.

So let’s wrap up and import our “flattened,” “exploded,” “burst” and “text-exploded” detail into Sketchup:


We can now start using our imported detail as a template for our 3d model: