I'm not sure what you are doing. You say:
"There would be enough money to pay the mortgage and loan and any arrears but probably nothing left after that."
If that is the case, it looks as if you will get nothing if the house is sold, because the debt to you (which I assume is separate from the mortgage & secured loan) will rank behind them unless you also have a charge on the house which was in place before the secured loan.
If you are unlikely to get any money from a sale I don't understand why you are spending money trying to get an order. Fair enough you jointly own the property, but if it is more or less in negative equity there is nothing for him to buy you out from.
However, to try & answer your question. If you would gain nothing (or very little) from a sale I find it difficult to see a judge ordering a sale when the other joint owner is still living there with a pregnant partner.