Hi,
The Code generate feature is available only in Visio for enterprise
architect versions (Visio 2002,Visio 2003) or with Visio 2000 enterprise.
Unfortunately there is no Visio 2007 for enterprise architect version and it
seem's that this feature will never been available in future version.
I'll try to grab some information about this feature at the Visio conference
next week.
Enjoy with visio.