/did -f dialog_name tab_id should work fine. It works for me. Are you sure $dname is set from wherever you're calling that command?