Hi,
I must admit that I used this PostCommand method just with PostableCommands that relate to the window arrangement.
These are TileWindows, CascadeWindows, ReplicateWindow.
Obviously, they do not interact with the current Document since they may invoke just Windows API methods.
(Respectively, ReplicateWindow generates a new View Element.)
For the PostableCommand.DetailLine, I haven't tried this on myself.
I would suppose it needs a valid 2D view to be executed (which could be done by assigning a proper AvailabilityClassName to your button).
So perhaps in the first run, it is invoked, but waiting for execution.
If you execute the original command manually, you see a cursor waiting for input; you then either draw lines by picking points etc. or you leave the command by pressing the ESC key.
After (and only after) that you can invoke another command, in the GUI.
This may be the cause of the error message for the second run.
What also comes in mind:
You only can invoke those PostableCommands on the very end of your command.
Nothing can be done in the Document after that, in your command.
If uiApp.CanPostCommand is true but Revit throws an Exception if you uiApp.PostCommand,
then I think there is a bug in the API.
No more ideas, sorry.
Revitalizer