The court may, upon application of the plaintiff, besides or instead of proceeding against the defendant by attachment, direct that the act required to be done may be done by the plaintiff or some other person appointed by the court, at the expense of the defendant, and, upon the act being done, the amount of such expense may be ascertained by the court, or by a referee appointed by the court, and the court may render judgment for the amount of the expense and cost, and enforce payment thereof by execution.
Iowa Code § 661.15