Export DWG file with Layer - PlugIn

Hi, I’ve been working on the plugin which could export DXF/DWG file from Sketchup 2D view. And it can
inherit the SU layer to dwg layer , as shown below


All lines are closed polygons and there are no separate line segments.

I’d love to find people who really need this feature help me test it further. It would be great if there are more suggestions for future features. If you are interested or have other features you think could be added, please let me know.

Regards,
Cora Z

14 Likes

This is gold!

3 Likes

I’d love to help! This is really needed.

Feature Requests:

  • Maintain Sketchup origin as DWG origin;
  • Export leaders, dimensions and texts;
  • Export multiple scenes in batch would create multiple files;
  • Option to export visible faces as solid hatches.

If @Odd_Haakon_Byberg won’t read this post, I would also take a look at this:

I would certainly love to help as well. Bring it on.

  • referring to wish item from JQL: I would actually prefer the scene axis as drawing origin instead of the SU model origin becoming dwg origin, that makes it more flexible. A export setting choosing between these is probably a good idea.

  • it would be really nice to set a ltscale while exporting: You kind of know by experience which one you need to set it to in order to get it right once inside Autocad. Would be nice to set that once for all exports.

  • Maintaining components as blocks is the ultimate perfect dwg export, but without that the dwg also works very much better once tags export is working.

AND THANK YOU FOR DOING THIS

1 Like

Agree with you absolutely. I don’t usually change scene axis but that’s the basis that should be used for export.

Exporting blocks as components would be great, but I don’t think that will be an easy one. In perspective view each component would only work if they were unique, in plan/ortho view that might work, in elevations and axonometric views, the plugin would need to be able to perform an analysis/comparison to see if the components will look the same and are fully visible to camera…

Imagine window components that are all the same, but in a different position of a façade that is diagonal to camera.

I totally understand your suggestions. The first and second features are not difficult to develop, and the third one might take some time, as JQL mentioned, and it requires determining whether an object is unique in 2D. Because I’m new to the design community, my main job is as a developer, one question that puzzles me is, why can’t Skalp and Curic solve your problems? The exported drawings seem decent to me. Is it because they don’t have closed polylines?

1 Like

-Totally agree, exporting blocks could takes weeks to develop, May I ask is this essential for your workflow?

  • Origin could be kept, from the current view or scenes, sounds simple
  • dimensions and texts can be exported, sounds not a lot of work
  • multiples scens surely, as they do in scalp and curic
  • I can’t fully understand why the visible faces need to have solid hatches, currently I will let user choose a hatch for each texture, so every texture in skp will be converted to a hatch pattern user selected, does this sounds reasonable to you? plz Let me know if I understand this in a wrong way
  • I have this little problem, why skalp can’t meet your requirements, cuz I am really new to Sketchup and design, mainly work as a developer, these plugin seems to provide decent result from my perspective
1 Like

There would not be an issue if a single scene was to be exported.

But what if multiple scenes were to be exported as ACAD viewports ?

Just as SketchUp’s drawing axes are separate and distinct from the model axes, so also is AutoCAD’s drawing axes separate from a UCS set by the user.

1 Like

I’ll try to reply to each of your questions as simply as I can:

I would like you to consider the following:

  • If you’ll allow an hatch per material, then I don’t need the above as long as solid hatches are one of the options.
  • Depending if the UI is simple enough to allow us to make a material that exists in Sketchup, correspond to a hatch, then the problem is solved.
  • That solid hatches would be a way to transfer colors from Sketchup to CAD and somehow don’t loose the rich visuals we can easily produce in Sketchup, because those are not often easy to produce in CAD.
  • Solid hatches are actually the only hatch that Layout is able to create in it’s exports and that’s one of the reasons we use it. So we are used to use them already to allow CAD users to identify these colors and, therefore, they are used in a lot of scenarios, like materials of a façade, space programming or areas of a masterplan.
  • I’d like to be able to toggle if no hatches are to be produced from the scene, or if hatches would be produced.
  • I’d love if the toggle for producing hatches would be active, the default hatches would be the solid hatches, so that unless the user would override which hatches should be produced, for which material, the exporter would create solid hatches based on color.
  • That besides you’d allow us to produce hatches from certain materials, you’d also allow us to have materials that produce no hatches.
  • That the settings that determine which materials should produce which hatch, and which materials produce no hatch at all, could be stored by model, so we could store them in a template skp model or on a specific template file that your plugin could read.

I have both Skalp and Curic and they are not DWG exporting plugins. Their development is focused around a specific workflow so their development is not DWG specific.

Their tools setup is focused on a certain way to export drawings, related to their specific workflow.

They have the little flaws you can see on @Odd_Haakon_Byberg tables and those flaws hinder what we can do.

I’d rather have something flexible, focused on the particular issues we find in DWG export, and unbound from the specificities of Plugins created to deal with sections.

If you’re going to develop an exporter, you could also think on an importer. There are a lot of simple flaws in importing DWG files into Sketchup, that have been standing around for years too.

I’d see HUGE value in that importer/exporter plugin, and I bet a lot of us would see that too.

1 Like

An option that should exist is actually that we should be able to add a datum to the origin. In Sketchup we must model close to origin when in fact it could be Km away from the topographical survey coordinates. CAD doesn’t require that.

We should be able to tell the exporter to add 10200m to X and subtract 1500m to Y and 0m to Z, so that the export will be placed on the right georefferenced coordinates and not the sketchup coodinates.

I hope you understand what this means, as it’s very important.

This should actually exist also for 3D Cad exports.

If the plugin would export those scenes not as viewports nor drawings inside the model, but as a DWG file for scene all could be easily solved with a lot of advantages. This could be done with several settings:

  1. Simply export each DWG file to a folder;
  2. Besides mport each of these files into a single DWG file, as Xrefs;
  3. Insert all Xref files into the origin of the DWG drawing;
  4. Or Insert each xref at a specific distance from each other, like 500m or 1 mile
  5. Assigne a specific layer to each Xref, named after the scene;
  6. Create a viewport for each Xref, in paperspace
  7. Or create a paperspace for each Xref
  8. When creating paperspace viewports, hide the layers of the other xrefs so that these viewports work, no matter if the xrefs would all be placed in origin, or with a distance far away from each other.
  9. Consider a drawing scale that should be assigned to each scene, so that the paperspace viewport created by each scene works well
  10. Consider that a scene like a plan view could be exported into multiple different paperspaces, each with a specific scale.

What this method would allow is for us to export a single or all scenes in batch, and either insert each drawing in a DWG file manually or auto generate a file, correctly organized to display all drawings.

It would also allow us to update a single drawing or all drawings, by ovewriting them. When this overwrite happens we can update all Xrefs in our base DWG file.

This allows us to keep refreshing our work in our main DWG file, from CAD side, while also keep working on Sketchup and update our model.

This would effectively allow us to work with Sketchup for design development, but keep working with CAD for drafting, detailing and construction documentation.

The main CAD file could have all drawing titles, annotations and whatnot, while a simple reloading of Xrefs would update the base drawings.

As it is right now, if we export DWG files, we hardly can work on the base DWG, as it might risk being overwritten.

I think the method above is the only one that can effectively replace Layout and use DWG as a drafting basis.

I don’t think assigning a UCS coordinate system for each drawing would be an easy management of the drawing, as UCS are meant more as temporary user coordinate systems. If we want to guarantee that we can coordinate all new versions of a DWG file, we must be sure that we have a fixed insertion point for each Xref file. So the scene coordinates are able to do this, as they would always export the same.

For certain workflows like masterplans, the origin of the model and datum could be the best option.

Yes please! This is amazing! You have my vote.

The 2D dwg export that we have from SketchUp has many problems, with the broken lines and all.

One things it does better than the other methods is that its 100 % accurate. Curic, Scalp, and exporting from Layout all have in common that geometry is only 99, 999 % correct in terms of measurents.

They share using the Layout API i am told, although that is not inside the scope of things I understand… :-).

That inaccuracy is a major problem when that dwg gets distributed around. And that is the main reason I don’t use them. It’s like virus, where every time you share a file you add some imprecision to that drawing, and when you get some geometry back from that consultant, some more imprecision is added all around.

SketchUp faces will not close, and everything becomes a mess.

2 Likes

I agree with the datum thing. That sounds complicated, but it does not have to be. You don’t need to consider what kind of maps are used, and what are their particularities.

All what’s needed to get this to work is the ability to add some 100 000 meters for x and y, and a value for z, and just move the whole model this much

Of course, if you have a feature like that, the next thing we ask for is if that value can be stored…. That value would change for every model, and (maybe) every scene,

You then easily ends up with a export pane of scenes to be exported, where export settings are stored to each export item on that list

From such a list one can envision batch export,

It’s my experience ( this may vary from country to country) that consultants want each floor plan to be a separate dwg file, and a dwg section to also be a separate file. So a batch export could just give each dwg the name of the scene, and put all those in the same folder.

2 Likes

Exactly.

For me a datum per model should be enough, and only when using the original model coordinates for exporting would that datum be applied. If the coordinates of each scene are to be considered, we would have to have a nice UI for this, where we could set which scenes to add the datum and which datum to add for each of these. The UI would be the greates consideration we would need.

At the same time, if the export/batch export method, is to export each scene as a single file, we could add our own datum ourselves, by simply placing the file into another DWG file at the correct place, so it becomes georeferenced.

So the most important feature for me, would be to have a consistent way of exporting fixed coordinates for each drawing, either the model origin, or the scenes coordinates, and then it would be a matter of importing Xrefs into our own CAD file and place them right.

This, of course, would negate the need for the idea of having the plugin exporting all files and also creating a main file with all xrefs and all paperspace viewports prepared.

I mean, if we have each scene as a different drawing, then we can keep refreshing each drawing, and reload it inside a file we prepare ourselves.

That’s already possible with Skalp. As it uses the center of the screen to place the coordinates of the exported drawing, what I do with it is that I create a scene where the center of my view is the same as the coordinate point. To do this I create a rectangle component with two lines crossing the middle, call it Coordinates, and center it in the coordinates point, scale it to be able to fit all of the model inside, zoom extents and save that as an export scene. This effectively centers the view on the coordinates I can import it to a CAD file.

Of course this is just as accurate as Skalp allows it, and the 99.99% accuracy makes this error more severe, the bigger the model is.

That is really the ideal, because, with each export, you know that they can simply refresh the drawings you send them.

Not having the possibility of a coordinate system in Layout nor having absolute accuracy, is really sad.

maybe something like this:

2 Likes

That would be cool! Great job with the mockup.

I’d love this and have some comments. I hope you don’t mind me abusing on your mockup and continue on the discussion.

  1. Maybe, having the export selected, makes batch export redundant. If we could select all, a single one, or have tick boxes for selection, we would batch export.

  2. I would like to have a way to override global setting on specific scenes. Maybe the tick boxes would allow us to adjust settings that are common to a bunch of scenes. Maybe I would have to selevt scenes with the mouse click+shift or CTRL and hit one of the 3 dots that would appear in front of scenes. This way I could curate settings that I wanted to be specific per scene, like coordinates and datum, or scales for export.

  3. The 3 dots might not be the best idea, there might be other ways of overriding settings on specific scenes. Maybe the same settings button would behave differently if a selection is active, but something clear must tell the user what would be happening.

  4. Can you explain what you mean by copy settings from a scene? Wouldn’t this override global settings?

  5. Shouldn’t scale be always set to 1:1If the plugin would create a drawing per scene? If the plugin would create paperspace and viewports for each scene, shouldn’t we be able to set the scale of those viewports. A single scene could generate a couple of pages, 1:500 and 1:100, for instance.

  6. Materials would be carried out to DWG as hatches? View conversion table on point 8

  7. Should groups and components really be exported to CAD? I mean my Sketchup projects are organized in Components and groups and I wouldn’t want to have a CAD file where all of the building would be a block, with several blocks for each of my wall groups, and everything following the same hierarchy of the model. DWG organization is by geometry and layer, while sketchup is by nesting groups and components. Maybe there could be a way of tagging components that you want to use as symbols and converted to blocks in export.

  8. The UI for global settings should feature this list for layer and material conversion. Maybe the UI should be in a different tab.

Again, thanks for your mockup, and I hope these comments don’t bother you.

of course. this is cool. ´ll get back to you after a rather wet ísh 24 hours awayting me now…

I only hope we dont scare off the developer.

All that is done so far just is really cool and I hope he keeps pushing even without our comments. Maybe he´s not into the whole workflow thing. (We should pay him along the way.)

I can say without sacrificing legal bounds, following the early development teams and their things: It´s all really cool. But it does little to tie together all the things that needs to get tied together.

1 Like

Maybe better to get scared from the start.

I think that what’s needed is a solution that really deals with all problems in a definite way.

That would be the only thing worth yet another DWG export solution.

(We would also need the import though)

Got your idea about hatch feature, that’s really nice suggestions. Now I totally understand why Solid hatch is a good choice and Toggle options for each detail feature would be nice. 100% understood. None of these feature is technically challenging, I will update the UI part when I finish designing the interface to double check with you guys.These are really helpful advices!

This is a completely new insight for me; I hadn’t considered that DWG import could be challenging as well. May I ask if you need to import different versions of DWG files? Does it make sense to support only DXF, or is that not really helpful?

Btw, Thank you for help me understand why Skalp is not good enough for your workflow!!

Another question I’d like to consult with you is about the pricing of plugins. I’ve released this software as a standalone EXE application (windows only) where I live, and users pay approximately $25 per month. Currently, I’m working on English version && wrap it up in Ruby for SketchUp plugin && support for IOS right now. I’m not very familiar with the pricing of other plugins. Is $25 per month considered too expensive for a plugin?

1 Like

THANK YOU FOR YOUR AMAZING WORK IN THE UI MOCKUP

that really help me further understand the your needs, here is some detailed question:

  1. what is the lowest version of CAD you need, currently I only support 2014 and higher, it might takes extra time if you need lower
  2. I got the idea of setting offset to datatum, it mainly help to get different scenes exported and orgnized in dwg file, am I on the same page with you guys?
  3. for the geometry part, I saw you put edges/faces as an option, may I ask is it ok to always present geometry as closed polyline, as another word in “face”.
  4. materials will be mapped into hatch pattern, and I’ll provide a easy UI for you to choose pattern, does this work for your workflow?
  5. dwt file is really a brand new insight for me. I haven’t looked into this file format it. I’m sure studying this will help you solve the style problem. I need some time to study whether this is an AutoCAD exclusive format. Once I figure it out, I’ll put update here.
  6. I would like to conduct a small survey. In my country, I released this as a standalone EXE software because we don’t heavily rely on SU plugins. Users paid $25 per month. Currently, I’m developing support for iOS and converting the code into an SU plugin to serve more users. However, I have very limited knowledge about the plugin market. I’d like to ask whether $25 per month is too expensive for a plugin (assuming it includes the common functionalities you mentioned).
  7. May I ask that In your country, is this export feature primarily serving architects or interior designers? While this may not have a direct impact on the UI and features, it could influence some of my optimization algorithms. The modeling content tends to differ between architects and interior designers. If you could answer this question, it would be of significant importance to me.
  8. Your suggestions are extremely valuable. Not scary at all. Actually, as developers, most of our time is spent on optimizing efficiency, system support, and server setup. The features themselves is the light work part. So, if It takes me two or three days develop a feature you really need, it’s definitely worth time. I would be more than happy to hear any additional ideas you may have.