DWG is not built into Stratal CAD. It works only through the free, optional plugin DWG via GNU LibreDWG, a separate GPL program you install yourself; every conversion is lossy.
Before you start
- The plugin DWG via GNU LibreDWG (free, in the Stratal plugin catalogue).
- GNU LibreDWG 0.14 or later, installed by you from https://www.gnu.org/software/libredwg/ (Windows builds: https://github.com/LibreDWG/libredwg/releases). It is a separate program under the GNU GPL version 3 or later. Stratal does not supply it.
- Opening needs no licence; importing into a drawing needs an active licence.
Without the plugin
- The File menu shows DWG… greyed out. Its tooltip, and Find command, give the reason: "DWG is not built in. DWG open and save come only through the optional, Stratal-signed plugin "DWG via GNU LibreDWG" (a separate GPL program, lossy), which is not installed."
- Opening a
.dwgfile shows the same reason, and nothing is opened. - No file dialog offers DWG, and Stratal CAD never saves another format under a
.dwgname.
Steps: set it up
- Install GNU LibreDWG on your computer.
- In Stratal CAD choose Plugins > Get plugins…, select DWG via GNU LibreDWG and install it. Or install a package you were sent with Install from file… in Plugins > Manage plugins…. See Buying and installing plugins.
- Choose Plugins > Manage plugins…, select the plugin and click Locate converter….
- Pick LibreDWG's
dwg2dxf.exe. Stratal CAD copies it,dxf2dwg.exefrom the same folder and the files beside them, and checks them before every use. - Click Restart Stratal CAD. From the next start, File > Open…, Import DWG… and Export DWG… offer DWG.
Steps: open, import and save
- Open: File > Open… and pick a
.dwgfile. It opens as a new, unsaved drawing; Save asks for a Stratal file name. - Import: File > Import DWG… adds the file to the current drawing as one undo step.
- Export: File > Export DWG… writes the drawing as DWG version 2000. This is experimental.
- Every conversion shows a report marked lossy, naming the LibreDWG version, its warnings and errors (the first twelve quoted) and what the DXF stage did not transfer.
How it works
Reading: LibreDWG's dwg2dxf converts the DWG to DXF, then Stratal CAD's own DXF reader reads it, with all the limits in Importing and exporting DXF. DWG versions R1.2 to 2018 can be read; files before R13 come through less completely.
Writing: Stratal CAD writes the drawing as DXF version 2000, and LibreDWG's dxf2dwg converts it. The plugin then reads the new DWG back with LibreDWG and compares it with what was written. If it does not hold the same objects, nothing is saved and you are told why. Only then is your file replaced, in one step; on any failure it is left as it was.
The converters run in a sandbox with no network access, only their own folder and a working folder, for at most 10 minutes each.
Other plugin tools
The plugin adds its own ribbon tab, named after the plugin:
- DWG survey (
DWGSURVEY) reads the version, code page and password protection of many DWG files without converting them, says what the plugin can do with each, and can write a CSV. - DWG batch convert (
DWGCONVERT) converts many DWG files, or a folder, to DXF or Stratal drawings, with a line per file saying what was lost, and a CSV.
Tips and common mistakes
- Check every converted drawing against the original. Nothing is claimed to come through in full, and the results are not checked against the program that made the DWG.
- Multileaders cannot be written to DXF version 2000, so they are listed as not exported. Multiline text written by LibreDWG can lose its text height; the report lists it.
- Exchange DXF instead of DWG when the other side can read it: it skips one conversion.
- If you update LibreDWG, locate the converter again: a changed copy makes DWG unavailable until you do.
Troubleshooting
| Message or symptom | What it means and what to do |
|---|---|
| "DWG unavailable" ... "was not opened." with the reason above | The plugin is not installed or did not load. Install it, locate the converter and restart. |
| "... its converter dwg2dxf.exe (...) is not located yet: install it (...), then choose it in Plugins > Manage plugins > Locate converter…" | The plugin is installed but LibreDWG is not located. Do steps 3 to 5 of set-up. |
| "the drawing is password-protected: its data is encrypted ..." | Protected drawings are refused and never decrypted. Remove the password in the program that set it, save the drawing again, then open it. |
| The file is refused as not a DWG drawing, or as ending inside its file header | The file is not DWG, or it is damaged or was not copied in full. Get a fresh copy. |
| "dwg2dxf could not convert the drawing (exit code ...)" | LibreDWG could not read this file. Ask for the drawing as DXF instead. |
| "dxf2dwg wrote a damaged DWG: read back, it holds ... instead of ... (a GNU LibreDWG problem); nothing was saved" | LibreDWG wrote a bad file, so nothing was saved. Export DXF instead. |
| "dwg2dxf did not finish within 10 minutes" | The file is too large or complex for the converter. Ask for DXF, or split the drawing. |
Related
- Importing and exporting DXF
- Using plugins in a drawing
- Buying and installing plugins
- DWG via GNU LibreDWG plugin
Related
- Buying and installing plugins
- Using the asset library
- Using plugins in a drawing
- Plugins in Stratal CAD
- Managing plugins
- Local automation
Still stuck? Open a support ticket or use Help, then Contact support in Stratal CAD.