Blueprint Help Send comments on this topic.
Translating Circuitry

Glossary Item Box

Overview

After having created a circuit definition, you will want to add custom code to the various objects to define data types and processing logic.  In order to proceed, you must first run the Blueprint translator to convert your circuitry into textual source code.  This creates code that divides into two distinct categories:

  • Base code
  • Derived code

Base code is always overwritten when circuits are translated and should never be modified because any changes would be lost.  All of the infrastructure logic is contained in the base code.

Derived code contains the user-customizable code that you will modify to provide custom logic and data types.  It consists of many classes that derive from the base infrastructure code and override their default behavior.

Fortunately, you do not need to be concerned with which files contain particular methods that you want to override because you can browse directly to the appropriate source file from the circuit editor as you will see in the next section (Browsing and Inserting User Code)

Translating and Compiling a Circuit/Project

The complete compilation process requires two steps

  1. Code generation of circuits and accretions etc.
  2. Code compilation

Code Generation

The Blueprint Translator will convert CDL descriptions of the circuit into compliable textual code (e.g. C++). This code generation can be done on a project basis or on individual circuits.  Simply select the desired circuit definition (or project) and select Compile from the right-click context menu. When the translation completes the Visual Studio compiler will start automatically.

Code Compilation

The Visual Studio compiler is invoked on the translated source in the usual way through the Build menu or by selecting Compile from the right-click context menu.  Any errors found by the compiler will be reported back to the user in the normal Output/Error windows.  If the translated source produces compiler errors then it is very likely that there is an error or warning in the circuitry and this should have been caught by the circuit validator when saving the file.  In this case, re-save the circuit from which the code was generated and look out for any messages in the Errors window.

If you choose to do a project or solution build and items have been added or removed to/from the circuits then Visual Studio will not pick up the changes to the project structure until the end of the build, which can result in compilation errors.  Performing a second build will resolve this and we recommend that you build projects that generate files until all projects are reported as "up to date" in the output window.

Inserting User Code

Once a circuit has been translated (it need not have been compiled), the generated code for circuit, active objects and stores can be edited (see Browsing and Inserting User Code).