New user struggling to re-size j-peg of floor plan. Please help!

Tried again. Looked at import Options this time. I’d used the defaults before, which had units Feet, but all other options unchecked (Preserve origin, merge coplanar faces, and orient faces consistently).

I checked the last two, but left Preserve origin unchecked.

Got these results:


There’s a couple of groups of stray edges on the left side of the import. Removing those makes Zoom Extents get close round the meaningful content of drawing. Everything is on the z=0 plane - no 3D elements - and there are no faces, and no components.

I suspect the units are not Feet. In one area there’s something that looks like a door, but it is well over 1000ft wide! That might make sense if the units should be mm.

Trying a third time, changing units to mm.

Makes more sense this time. All layers are on, and there seems to be no hidden geometry.

Deleted stray edges, zoomed extents again, and things look better. But it’s hundreds of metres off origin. Relocated the whole drawing close to origin, and saved. Here’s the result as a 2016 SKP file. Uncompressed, it’s too big to upload here, so I’ve zipped it.

1526-P-100 Ground_A.skp.zip (993.6 KB)

I have no idea whether the TECLA software import DWG plugin would work better than Jim’s DXF import, but the latter would need you to convert the DWG file first to DXF, for which you could use the Teigha File Converter.

Try both to see, unless someone else on the forum can offer experienced advice.

No, not quite as you describe, but very simply anyway.

Now you have installed the Sketchucation Tools, you can search for and install other plugins using the following steps:

Go to menu Extension/Sketchucation/ExtensionStore.

This opens a new window called Extension Store 3.0.

Third icon along at the bottom is a Search function. Click it.

A search box opens at the top of this window. Click in it, then type the name of the plugin you want to find/install.

When you find one or several that match the search term(s), you will see a red icon to the right. Click that to install the plugin.

Follow the prompts on screen, and you are done. You might need to restart SU to see the plugin’s toolbars or menu additions.

Thanks so much for all your help John! Quick update as I’m heading out with my family for the day. Firstly yes - definitely mm not feet thanks. I’m in the UK.

Have attempted to download the Tecla Software import DWG and Teigha File Converter following your lovely clear instructions. Think it’s all worked but will check tonight.

…and the zipped file you sent has opened in my SketchUp. Hay! I have a .DWG file open in SU!

One thing it just says if I save it in my SU format (Make 2017) I won’t be able to re-open it in your original format but I assume I just save it under mine?

Will get back to you, and thanks once again!

@lynners
Back to using the SketchUcation ExtensionStore…
If you resize its dialog, pulling it to the right, you’ll see more buttons etc…
The initial default list is the most recent RBZ’s added or updated.
The search tool is the magnifying-glass in the bottom bar… [just missing off your screen-grab]
With that you can browse hundreds of RBZ by key words, or category, author etc, using the other search option dropdowns in the other [top] bar…

Hi all,

Thank you so much for your previous response here. I was able to use the DWG file that you converted to an SKP for me thanks John.

I now have more DWG’s that I need to open and it doesn’t seem to be working. I have downloaded the Tecla Software import DWG and Teigha File Converter. Please see ‘step by step’ screen grabs following so you can see what is happening. I have tried changing the unit to metres,centimetres and millimetres and they all fail.

Any advice gratefully received.




Many thanks!

Lynners

Can you post an example DWG file that shows this behaviour? Either upload here (if < 3MB) or via 3DWarehouse or Dropbox link?

Hi there,

Thanks very much John. Please see attachment below.

1526-P-201 Section BB.dwg (275.2 KB)

Looking at the extension’s Ruby code, the “Error 99 - Import failed” message just means that some sort of exception happened during the import attempt; the 99 doesn’t indicate anything about what. Have you tried running the import with the Ruby Console window open? It is possible that it will reveal more info about exactly what went wrong.

Edit: After some debugging I found that the problem is that the dxf file generated by the teigha converter contains an illegal UTF-8 byte sequence in the string

"\xA92016 nimtim. This drawing is not to be scaled - use written dimensions only. Any discrepancies to be reported to the architect. All dimensions to be checked on site.\r\n"

I don’t know whether that came directly from the dwg or was generated by the teigha converter, but that leading \xA92016 breaks the Ruby code in the TECLA extension on Mac.

Further edit: I found the bug in the TECLA extension: it has not been correctly updated for SU 2017! It tests for Ruby version 2.0.0 when deciding what encoding the dxf file should have. SU 2017 is at 2.2.4, so this test fails and by setting the wrong file encoding the extension can’t parse the file. As proof of the diagnosis, I altered the crucial line in the extension and your file then imported correctly. I’m going to report this bug to TECLA. In the meantime, if anyone cares, I can supply the corrected file to substitute into your installation of the extension.

@jim_foltz I see your name mentioned in the code credits. Has teclasoft shut down? The links to their site are broken, so I haven’t been able to send feedback.

The file imported without errors with the SketchUp Pro native DWG importer. It has some slight issues when viewed with AutoCad: the coordinates are upside down and there are missing XREF files.

Anssi

Section.skp (548.9 KB)

I didn’t have anything to do with the extension that I remember. Probably just some copy-pasta.

Perhaps they lifted your code directly? The top of their dxf2ruby.rb file says

# coding: utf-8
module TECLAsoftware
	# @author (c) 2013 Jim Foltz {mailto:jim.foltz@gmail.com jim.foltz@gmail.com}  - {http://github.com/jimfoltz/ruby-dxf-reader https://github.com/jimfoltz/ruby-dxf-reader}
	# @version 0.1.0

Naughty !?
:astonished:
BUT TECLAsoftware Import DWG | SketchUcation
It does credit Jim !

I suggest you moan direct to the author…

Tecla sounds fishy as Tekla (with a “k”) is a Trimble company specialized in structural modelling software and BIM (the free IFC viewer/processor BIMSight is one of their products).

Anssi

Thank you all for your comments. Thanks Anssi for uploading the SKP file once you used SketchUp Pro native DWG importer. It certainly helped in the interim as I needed to check a dimension urgently. As it imports the drawing upside down though I would hope that I can find a way to import the correct way up, so would gratefully take on any advice.

Is the best thing now to use Steve’s corrected file to substitute into the installation of my Tecla extension? If so, some step by step instructions on how to do this would really help. Slightly nervous of Anssi’s comment re. Tecla versus Tekla with regards to this though.

Meanwhile Steve if you did manage to import my file correctly do you mind uploading the SKP file so I have that as a reference while I work out how to open the remaining DWG’s?

Many thanks all.

Here’s the corrected Ruby file:

dxf2ruby.rb (6.9 KB)

To install it, navigate to the extension’s folder:

/Users/lynleawest/Library/Application Support/SketchUp 2017/SketchUp/Plugins/TECLAsoftware_importDWG/

Note: your Library folder is hidden by default in the Finder. Unless you have set the preference to show it, you will need to use Finder’s Go->Go To Folder menu item to get there.

Copy the attached file into that folder (replace the existing) and it should correct the issue. I don’t know quite why, but sometimes it still fails for lack of finding the dxf file created by the teigha converter - it usually works if I try the same file a second time. I suspect there is either an issue with management of the temporary folder where it puts the dxf, or maybe with not waiting long enough for the teigha converter to complete.

And here’s what I got from the import into SketchUp. After import, I moved the imported group to the model’s origin because SketchUp doesn’t like model content to be far from the origin (a common problem that this importer doesn’t address). And I flipped it in the green direction so that it isn’t upside down. I notice it is quite a bit larger than the file Anssi provided earlier, maybe because this importer brought over a bunch of text?

1526-P-201 Section BB.skp (2.5 MB)

Edit: I found evidence that indeed this extension doesn’t wait long enough for the Teigha converter to complete, and that causes the remaining errors I’ve seen. Replacing the loader.rb file in that same folder with this one puts a 5-second pause into the process to let the converter run. For a very large dwg that might still not be enough…I haven’t got a sample to test on since I don’t use AutoCAD myself!

loader.rb (48.1 KB)

Thanks Steve,

I wasn’t able to access the Library - see below-

So went in to Sketch Up/Sketchucations Plugin folder.

I then dragged your Ruby file from the downloads folder in to it. It said that it contained a file with the same name and did I want to replace it. After saying yes unfortunately when I then tried to open the DWG I still got an ‘error 99 Fail import’. I did this twice just in case but still to no avail.

Any ideas please?

The screenshot you posted shows you had your Desktop selected when you attempted the Go to folder. Since the required location is under your home folder (lynleawest), not the Desktop, simply trying to go to “Library” won’t work! It would be best to copy and paste the entire path I provided earlier (unless you aren’t doing this as user lynleawest, of course :wink:).

I’m not certain from your words: did you copy dxf2ruby.rb into the SketchUcation folder, or just use that trick as a way to find the TECLAsoftware_importDWG folder? I’m assuming the latter, as there certainly shouldn’t be a file of that name in the SketchUcation folder!

I found another issue that can cause failure and fixed it in the loader.rb file in my earlier post, so you should also copy that file to the extension’s folder (on the forum it looks like nobody downloaded the latest version of loader.rb yet) . There was an indentation error in my first version of loader.rb that prevented it from loading, so be sure to get the one that is currently on the forum.

You will need to quit and then relaunch SketchUp after copying in the files, as they are read as SketchUp starts.

After all that, please open the Ruby Console window before running the importer and if it fails again, tell me what messages you see in the upper part of the console.

OK. So I pasted the entire path which took me to the following-

I dragged in and replaced the existing ruby file (which obviously had copied through earlier today anyway.) I then closed and re-opened SU, tried to import a DWG and got this -


I then went back to the path link and replaced the existing loader.rb with your previously attached file.

But unfortunately there was still error messages when I closed, re-opened and tried again.

By the way when you asked ‘I’m not certain from your words: did you copy dxf2ruby.rb into the SketchUcation folder, or just use that trick as a way to find the TECLAsoftware_importDWG folder?’ to explain further-
I dragged the ruby file in to the Sketchucations folder, but thought as it was part of the code written for the Tecla software, dragged it again on to the Tecla icon. When I did it asked if I wanted to replace the existing file with that name. I said I did.

Additionally when you’ve asked above to ‘please open the Ruby Console window before running the importer and if it fails again, tell me what messages you see in the upper part of the console.’ could you please explain further as I don’t know what the Ruby Console window is.

Thanks for your patience and persistence!

Well, we’re making some progress at last!

That messagebox about the returned error code is one I added. It is saying that for some reason the system wasn’t able to run the dwg->dxf stage of the import (which uses the TeighaFileConverter). The subsequent Error 99 one ensues because there is no dxf to import!

I haven’t seen that error code before. I’ll have to do some more digging to see what it means. It could be an issue with a particular file. Have you tried the 1526-P-201 Section BB.dwg? It converted ok for me, so if it fails on your Mac I suspect a problem with how the TeighaFileConverter is installed. Let me know if that file imports ok and if so, please share a file that fails.

To open the Ruby Console window, in SketchUp use the menu Window->Ruby Console.

I have looked at that Tecla PluginStore entry.
The latest RBZ file is poorly constructed - there’s a subfolder within the RBZ containing the RB and subfolder…
I have reconfigured the RBZ, included the fixed loader.rb and re-signed them too [v1.0.2x until the author fixes it directly !]
Here’s the latest download:

Hopefully the author will fix it properly sometime…