Used to change solid blocks into dropped diamond swords in earlier versions of WorldEdit. I can't vouch that it will work now. No harm in trying it.
I just tried it, and it just sets the block as air.... So maybe just drop the diamond sword and make the area off limits with WorldGuard?
What exactly are you trying to do? Explaining the situation will help me understand the problem at hand and suggest a more clear solution.