It depends on the version
If you are using one w/ the macro recorder,
record a macro with mouse click not checked nor the other one.
-draw a line of any length and angle on the visible screen
do not zoom in(as this can add copious amounts of extraneous code related to the view object.
-switch to the selection info palette
under the Metrics node where you see the length and angle property -
-change each field slightly and press enter
-switch back to the Macro recorder to view the code
gxChild.Properties("%M_Angle") = radians
gxChild.Properties("%M_Length") = current units
All available object extended properties that show up under Metrics node that do not have the +sign beside them can be accessed this way
and they also make good autoFields in the database, though some of the extra prefix characters need to be removed and the underscores may vanish after closing.
Sure wish that I had more time to code, I get goose bumps just talking about it.