How to convert representation into a PDB file?

Though, It is not the scope of this forum, but I will try to answer.

In TK console: Try followings

set sel [atomselect top "all"] 
$sel writepdb "out.pdb"