Baking Document Text/Text Fields into exports

I use layout templates automatically populated with text fields containing several DocumentText fields containing global project info such as a client name, broader project information and then supported by individual drawing details:


This is fine for work within Rhino, however whenever I need to export as DWG for a client or for colleagues that don’t use Rhino these fields are exported literally. That is, when re-imported to Rhino they work as fields (albeit with missing document info) however as DWGs they no longer parse as fields for obvious reasons.

Now, is it possible to script this as a “pre-export to DWG” to housekeep these values, baking them in so that DWGs display correctly? In an ideal world the export function would have option to bake field values in purely for the purposes of the export function, however I can’t see that being high on the list of functionality changes for future versions. I very rarely work in the scripting languages available, but this seems like it might be an ideal candidate for one…even if it would be more one-way than as a function of the export path.

Any ideas or suggestions? Let me know if I missed some detail about what I mean…thanks!

Hi Carl - this was recently fixed (RH-53495) and tested to be working in 6.17. From Kelvin’s comment in the report, it is possible that this also is in 6.16.

Thank you Wim - checking, it seems that I’m running SR6.15.19164.21011 so I guess this fix will happen in the next minor update. Just an issue to keep in mind till then.

Hi Carl - you can change your update frequency to install Service Release Candidates. That will get you on 6.16 now.

Appreciated, Wim. I don’t think running on the bleeding edge of releases is correct for my workplace, so we’ll simply bear the issue in mind and let it roll forward once we’re in general stable release territory.

Well that happened quickly…running 6SR16 now.

I would hazard that we’re thinking about different issues; exporting a 3DM file with Text objects containing Text Fields (as detailed above) still exports the field code rather than baking the contents of the fields. For example, if I have a key in the document user text (referred in a Text object as %<DocumentText(“projectname”)>%) I’d like exported files (such as DWG) that do not evaluate document text fields to have them baked in. That is, have the field contents exported and not the field name code. Clients don’t use Rhino for the most part, so sending drawings as DWG, etc. ends up meaning that we cannot use document user text to retain global project values. Does this make more sense, or am I missing out on what has changed?

Hi Carl - sorry for getting back to you this late.
I’ve now tested this with both document user text and attribute user text and it looks like a current internal build of Rhino 6 gets this right now.

This was exported from 6.15:

And this is the same exported from 6.18:


Hi Wim,

Just back from summer break - everything is working as it should be now; excellent stuff! I’ve just exported a DWG for a client based on our internal 3DM files with document property fields, and they’re baked in as the value rather than the field code.

Perfect. Thanks again!