I has been decades since I've created a LISP program, and even then my efforts were quite minimal. But, this utility should be quite simple, and may be a good way to get back into LISP.
Thinking through the logic of the program,
- User would type 'c [c for convert]
- The program would take over and at the command line, and prompt the user to enter the value. It would expect the user to enter the distance the same way it would expect if the transparent command were not used. For example, if units were set to inches, and you were entering the 2nd point for a line in mm, you might enter 23mm<45, or 4'3-1/2"<0.
- The program would first check what the current units were [i.e. inches]
- Parce the entry, perhaps first checking for the distance value, and separate out the angle entry to process separately.
- Check if there is a comma, indicating x,y entry, and process each separately.
- Look for any symbols or text that will indicate the units being entered. E.g. mm=Millimeters, a ' indicates architectural units.
- Architectural and fractional inches require some extra parcing and conversion to a decimal value.
- Convert the resulting value to the current units.
- Enter the value at the prompt, with the prefix @ and suffix of the angle if those were entered.
Personally, I never use anything but the AutoCAD directional units in degrees. Though, perhaps the surveying folks would want more. Another limitation would be the lack of support for temporary reference points or coordinate filters [e.g. .x]
-Joe