They'd learn pretty quickly when people started shooting back.You would be surprised at how many officers would violate the 2nd Amendment. Many in the military dont even know what the 2nd Amendment is or even why it exists. That is evident by the number of retired officers who say that the public should have AR15s or AKs. Orders to confiscate guns, while violates the 2A, doesn't violate provisions under martial law. A nice little grey area.
If you think that NG troops or even RA are guaranteed to back the populace, you'd be in for a rude awakening. I have no idea how many would take part but I KNOW there are some that wouldn't hesitate. You have to remember that it was General Officers that were behind the law that made it illegal to carry a gun on military bases during Clinton's administration
If it ever gets to the point that they're doing citywide-lockdown, house-to-house searches, you know the penalty for being caught with a firearm will be severe. Severe enough, and it's worth it to fight back.
Do it in a big city, where you have lots of tall buildings, and it gets ugly, fast. It doesn't have to be everybody with a gun, or even a majority; just a few handfuls with rifles on high ground could make things painful, and when the news got out to other cities--and it would get out--it'd be a nationwide shitstorm.