R8 - The file writing plug-in failed

hey,

R8 - save as .dwg >> “The file writing plug-in failed.”

thx
Benjamin

Hi Benjamin,

Can you open a new file place a rectangle, save as .dwg and get the same result? I’m not seeing the issue on a quick check here.

If its happening in a particular file please post here or send privately to mcneel via upload

Please post your Rhino SystemInfo (type the systeminfo in the Rhino command line)

hey Japhy,

this error just occurs from time to time, which is understandably not very specific.
today everything worked with the rectangle in the new file and my large project file.

If this happens again I will upload a file.

thank you,
Benjamin

@Japhy
The following file should demonstrate this issue (originally from a dwg file but copied and transformed)

SaveAsDxfNotWorking.3dm (35.5 KB)

Successfully read file "C:\Users\<<>>\Downloads\SaveAsDxfNotWorking.3dm"
Command: '_SelAll
1 leader added to selection.
Command: SaveAs
Error writing file.
 
 
Annotation:    1 written,   0 skipped
Layers:    2 written,   0 skipped
Textstyles:    1 written,   0 skipped
 
 
Failed to save as C:\Users\<<>>\Downloads\SaveAsDxfNotWorking.dxf.

Thanks for reporting RH-87322 , That appears to be a regression, the file does export to dxf in Rhino 7.

There’s something weird about the leader in your file. If I remake it, snapping to the points of the original. Using the same dimstyle and overriding the arrow size to 400. And changing it to a custom, lime green color, the new leader will export if I delete the original.

In V8, the acad export plugin is adding the geometry to the Open Design (the SDK we use) database fine. That’s why you see:

Annotation: 1 written, 0 skipped
Layers: 2 written, 0 skipped
Textstyles: 1 written, 0 skipped

The SDK throws an exception writing the database to the file though. That’s not something we can fix. I did try updating to their most current version and it also throws the same exception.

As it stands, at least with regard to the exporter, I’m not going to revert the version of SDK we use back to what we used in V7 for a corner case. However, if we can figure out what about your geometry causes the SDK we currently use (and the most current version available) to choke then I might be able to add some fixes in the plugin to get around the SDK problem.

Incidentally, can you include the dwg file that you copied from? Maybe there’s something goofy with the importer that’s making weird stuff and that’s the root of the trouble.

Tim

Here’s a reproducible example that I’ve just tested. I’d think it is the same bug, except that it now appears to be when it is on the right plane.

  1. Create an arrow like that in the right view

  2. Attempt export


Resulting R8 file:
LeaderOnRight.3dm (33.8 KB)


The original customer DWG file that I had imports and exports just fine. Trying again from the original, the export failing appears to only happen once I rotate it into the right view.
(It includes a lot of other geometry that I narrowed down to this failing).
I would rather not share it publicly.

And it looks like doing it in the front plane and then rotating it so it has a little bit of depth also causes it.

  1. Draw a leader shaped with a horizontal segment and a vertical segment like below in the front plane.
  2. Use gumball to rotate it around z a degree or so so that it would show in the right plane
  3. Export to DXF/DWG

I can repeat the problem with a leader in the right view. Thank you, that’s very helpful. I’ll file a bug with Open Design Alliance today.

Tim

1 Like

I’m making progress on this. The code that causes the exception was added for https://mcneel.myjetbrains.com/youtrack/issue/RH-72074. Earlier versions of the ODA SDK did not throw the exception. It may be that the more recent SDKs don’t need that code and it can be removed.

This should work better in the first release candidate of Rhino 8.20. If you see anything weird please let me know and I’ll look into it asap.

Tim

RH-87322 is fixed in Rhino 8 Service Release 20 Release Candidate