Generating code from custom blocks

You can write a custom block in Embed using the Embed add-on API. The Embed install supplies a Microsoft Visual C wizard that will create a project for you. This lets you run pure simulations on the host and when code generation is requested, your code is emitted in the generated code; Embed sends a message to your DLL at code generation time requesting a code generation string if the standard call is not sufficient. The code generation string may contain %n references that will be expanded by the code generator to the expressions that represent the values flowing into the nth connector.