Hello barrabasito,
Welcome to the forum.
If you haven't seen it already, please have a read through the "MIDI sequencing, the Hauptwerk AU/VST Link and applying external real-time effects plug-ins" section in the main Hauptwerk user guide (pages 263-292 in the current v7.0 version). For example, the "Composing pieces off-line from a MIDI sequencer configured conventionally, method 2: specifying your own MIDI implementation manually ... (Hauptwerk as a ‘slave’ MIDI device)" sub-section (pages 273-280) covers how you can route MIDI to Hauptwerk from your VST host, and route audio from it back to your VST host. If configured in that way, you could use right-click MIDI auto-detection in Hauptwerk if you preferred, instead of configuring MIDI settings manually for each virtual control.