Autocad R12 Leader Export

I have a problem with exporting leaders to Autocad R12. In the attached file, there is a dimension, text block, and leader all created with the default annotation style. They are exported from model space as a DXF with either the 2007 Natural or R12 Natural settings.

The 2007 Natural version imports into AutoCAD viewer (TrueView 2022). The dimension and text block show as expected, but the leader text is very small (ignores the 10x scaling of the annotation style). Note that the scaling issue happens even when re-importing into Rhino.

The R12 version refuses to import if the leader is included. If I just export the dimension and text block, it’s fine. It appears to be an issue with the color index setting getting a 257 value which is not valid (see line 1306 of the file).

Anyone have any insight into how to get these to export correctly? Rhino 7 file is also attached.

LeaderExport_2007.dxf (165.3 KB)
LeaderExport_R12.dxf (10.5 KB)
LeaderExportIssue.3dm (44.2 KB)


Hi Jonathan - as far as I can see the 12 Natural accepts the leader and scales it correctly - can you look at the attached and see if that seems correct?

text_dxf12withScaling.dxf (10.4 KB)

I see that 2007 Natural does not do the leader correctly - thanks for the report.
RH-68126 File IO dxf export ignores scaling
Color error:
RH-68128 File io: dxf color errorfor leaders


Hi Pascal,

The file you sent back opens with the leader scaled correctly in Rhino. Did you do something different to export that file?

The “refusing to import” is when I try to open it in other DXF compatible software, the AutoCAD viewer (and I’m assuming AutoCAD itself). The issue is the indexed color that is out of range as I referenced above. That same invalid color is present in your file (line 1306). I’m assuming that Rhino is okay with that color number being > 255 even though the valid indexed colors only run 0 - 255.


Maybe… I only had model space scaling set - I had turned both off and only that one back on when I exported.
Nope - same with both checked.
I see the color thing, thanks.


I was getting different results, but realized my updates hadn’t been updating anymore. When I installed the latest release, I got the same exported file as you.


1 Like

Hi Jonathan,
Can you send us your current Rhino System details?
Open Rhino and type the SystemInfo command.
Copy and paste the results into the thread.

Thanks for your help.
Mary Ann Fugier

Here you go:

Rhino 7 SR17 2022-3-29 (Rhino 7, 7.17.22088.17001, Git hash:master @ 3febe0d05f456cefe4cdacac3877d33f69421869)
License type: Commercial, build 2022-03-29
License details: Cloud Zoo

Windows 10.0.19043 SR0.0 or greater (Physical RAM: 16Gb)

Computer platform: DESKTOP

Standard graphics configuration.
Primary display and OpenGL: NVIDIA GeForce RTX 2060 SUPER (NVidia) Memory: 8GB, Driver date: 12-29-2021 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 511.09
> Accelerated graphics device with 4 adapter port(s)
- Secondary monitor attached to adapter port #0
- Windows Main Display attached to adapter port #1

OpenGL Settings
Safe mode: Off
Use accelerated hardware modes: On
Redraw scene when viewports are exposed: On
Graphics level being used: OpenGL 4.6 (primary GPU’s maximum)

Anti-alias mode: 4x
Mip Map Filtering: Linear
Anisotropic Filtering Mode: High

Vendor Name: NVIDIA Corporation
Render version: 4.6
Shading Language: 4.60 NVIDIA
Driver Date: 12-29-2021
Driver Version:
Maximum Texture size: 32768 x 32768
Z-Buffer depth: 24 bits
Maximum Viewport size: 32768 x 32768
Total Video Memory: 8 GB

Rhino plugins that do not ship with Rhino
C:\Users\Jonathan\AppData\Local\Programs\Enscape\Bin64\Enscape.Rhino7.Plugin.dll “Enscape.Rhino7.Plugin” 0.0.21323.1750
C:\Users\Jonathan\AppData\Roaming\McNeel\Rhinoceros\7.0\Plug-ins\TeDAsharp (ce983e9d-72de-4a79-8832-7c374e6e26de)\\TeDaSharp_050.rhp “TeDAsharp”
C:\Program Files (x86)\Evolute\EvoluteTools LITE for Rhino 6\EvoluteCoutHook.rhp “EvoluteCoutHook”
C:\Users\Jonathan\Documents!Toque Innovations\RhinoScripts\elefront422\elefront421\ElefrontProperties.rhp “ElefrontProperties”

Rhino plugins that ship with Rhino
C:\Program Files\Rhino 7\Plug-ins\Commands.rhp “Commands” 7.17.22088.17001
C:\Program Files\Rhino 7\Plug-ins\WebBrowser.rhp “WebBrowser”
C:\Program Files\Rhino 7\Plug-ins\rdk.rhp “Renderer Development Kit”
C:\Program Files\Rhino 7\Plug-ins\RhinoScript.rhp “RhinoScript”
C:\Program Files\Rhino 7\Plug-ins\IdleProcessor.rhp “IdleProcessor”
C:\Program Files\Rhino 7\Plug-ins\RhinoRenderCycles.rhp “Rhino Render” 7.17.22088.17001
C:\Program Files\Rhino 7\Plug-ins\RhinoRender.rhp “Legacy Rhino Render”
C:\Program Files\Rhino 7\Plug-ins\rdk_etoui.rhp “RDK_EtoUI” 7.17.22088.17001
C:\Program Files\Rhino 7\Plug-ins\rdk_ui.rhp “Renderer Development Kit UI”
C:\Program Files\Rhino 7\Plug-ins\import_ACAD.rhp “AutoCAD file import: import_ACAD”
C:\Program Files\Rhino 7\Plug-ins\NamedSnapshots.rhp “Snapshots”
C:\Program Files\Rhino 7\Plug-ins\Alerter.rhp “Alerter”
C:\Program Files\Rhino 7\Plug-ins\RhinoCycles.rhp “RhinoCycles” 7.17.22088.17001
C:\Program Files\Rhino 7\Plug-ins\Toolbars\Toolbars.rhp “Toolbars” 7.17.22088.17001
C:\Program Files\Rhino 7\Plug-ins\3dxrhino.rhp “3Dconnexion 3D Mouse”
C:\Program Files\Rhino 7\Plug-ins\Displacement.rhp “Displacement”
C:\Users\Jonathan\AppData\Roaming\McNeel\Rhinoceros\packages\7.0\SectionTools\2020.12.7.446\SectionTools.rhp “SectionTools”

Hi Jonathan,

At first glance this looks like it might be something with the libraries we use to export dxf and dwg. It only seems to be an issue with the R12 .dxf files and any flavor of .dxf file that uses aci for the color runs the same code. Just curious, can you use a flavor other than R12? 2007 Natural, for instance, does not seem to have the problem.


Hi Tim,

Yes, there are a few workarounds that are possible. In some cases I can use 2007, in some cases, I can omit the leaders, and in the worst case, I can edit the dxf and replace the invalid color references. I have some clients that are still running pre-2007 software packages in their shops so that’s why the issue comes up.

Does the library cause the scaling problem with the 2007 export or is that something that could be fixed?
Edit: Just read Mary’s notes in RH-68126 and it looks like this is fixed in Rhino 8


Hi, i have issue with export leaders to, but different…:

What i see in Rhino:

And what i see in ACad:

Any idea for this behavior?
Thank you.

Hi -

This was recently fixed: RH-72074 File IO: Leader exported to DWG pointed to a wrong place
From the report, the fix should become available in this week’s 7.28 Service Release Candidate and the Rhino 8 WIP.

1 Like