Well, you certainly have a common law right to enter a courthouse where they store documents and records that are public records.
They would likely argue that security measures are allowed but if one can carry I don't see how they can make you disarm. What are you supposed to do with a loaded gun? Its unsafe to hand it over to another unfamiliar with the firearm and you cannot leave it on the pavement outside. For all they know, you walked 20 miles to get to the courthouse. So in your travels to the courthouse you lose your RKBA?