Is there a way to use formulae for data input on the command line and elsewhere?

Situations arise where it would be useful to enter data on the command line, and elsewhere that manual data entry is needed, as the result of a formula calculation rather than as a discrete value.  Currently I have not found a way to do this. 

Is such a feature available? and if so how is this accomplished?

A specific reason for the need is that I can write separate commands that contol the cross-hair cursor size where each command inserts a discrete value but I cannot write a single command that toggles between two (or more) values because the command line fails to recognise a formula that is needed to achieve the toggle.  This significantly reduces the advantage of being able to create commands that have the capability of stream-lining aspects of using DraftSight.