You could start with the DDL templates which are generating DDL SQL from the catalog contents of a project. You could extend these templates (the one for your DB) with logic which traverses the entities in the Entities property of the current project.
(It's my understanding you're looking for a way to generate DDL SQL for the schema ? Or is your goal differently?)
(edit) I missed 'eval question' so you don't have the DDL SQL templates available to you (they're only available to customers at the moment).
Everything in the project object graph is available to you, you can write an add-in, a template to emit whatever you want (text, html etc.) or even a tool which consumes the project object graph and does additional processing.