LISP Dimension text change and text conversion to second line

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm looking to create a lisp routine to change the text of a selected associative dimension to a user specified number, in millimeters. The part I'm having a difficult time figuring out is converting the user specified number to inches which is placed below the mm number. Attached is an image of what I'm looking for.
I figured out how to manually enter the changes in the properties text override, 500\X(19 11/16), as well as changing the dimstyle to reflect what I'm looking for but overriding the text manually is too tedious for the dozens of dimensions in each dwg. And the dimstyle option doesn't work because our drawings are not to scale and the scale factor changes from dwg to dwg. Any ideas where to start?
Not sure if this matters or not but this style applies to horizontal and aligned dimensions as well.