Visio once had the capability you're asking about -- but it's been gone for at least 15 years.
There is an open source project that claims to export database definition from Visio: https://www.sqlbi.com/tools/visio-forward-engineer/
I haven't used it so I can't verify whether or not it works but if you are willing to work with the open source code, it might get you closer.