Free tutorials · Cameo Report Wizard · VTL · Metachains

Cameo Report Wizard and VTL: generate documents from your SysML model.

Every Report Wizard, VTL and metachain tutorial we’ve published, in the order we’d learn them. When the model changes, you regenerate the document instead of editing it by hand, so what you deliver always matches the model.

These are the original CameoMagic videos and project files. This page is their home.

Template · VTLRequirements.docx
## one table row per requirement
#forrow($req in $Requirement)
$req.id | $req.name
#endrow
Output · WordGenerated

2 Requirements

IdName
EV-1Driver Authentication
EV-2Charge Power
EV-3Connector Interlock
EV-4Session Pricing

Tools › Report Wizard › Generate

9 videosReport Wizard, VTL, metachains and custom columns
About 7,000 viewson our metachain and structured expression video
5 project filesDownload the finished model behind a video
Word, Excel, PowerPointand HTML output from one template language

Learning path

Learn Report Wizard in six steps

Start with the templates that ship with Cameo, then build a model that is ready to print, then write your own VTL. Metachains come last because they make your tables and templates answer bigger questions.

  1. Run a built-in template

    Open Tools › Report Wizard and pick a built-in template, such as the activity diagram Word report. Set the variables, scope it to a package, choose the output file, and click Generate.

    Video: Report Wizard & VTL tips →
  2. Read the VTL behind it

    Open the same template to see the Velocity Template Language that produced the output. The built-in templates are the best examples of loops, macros and tables. The MagicDraw Report Wizard template creation tutorial (31 pages) covers the basics.

  3. Get the model ready to print

    Give requirements a stereotype with the attributes your document needs, add the Report profile to the project, and store the title, author and revision as Report Data variables.

    Video: Report Wizard model build →
  4. Write your own template

    Create a new template in Word, then loop over the elements, repeat table rows with #forrow, and insert diagram images. Word is the easiest place to troubleshoot: turn on line numbers so an error message points to a line.

  5. Navigate with metachains

    A metachain follows a chain of relationships from one element to another, for example from a block to the requirements it satisfies. Use one as a custom table column or as a derived property.

    Video: simple navigation vs metachain →
  6. Debug what you built

    Check the gotchas below before you search forums. Most "the whole template failed" errors come from a few well-known quirks.

    Report Wizard gotchas →

Gotchas

Report Wizard and derived property gotchas

We found these while building and testing report templates against a real model with Cameo’s own report engine. We build templates in Cameo 2022x, 2024x and 2026x.

Report Wizard

Element lists are keyed by stereotype

In a SysML model, $Class can come back empty while $Block, $Requirement or your own stereotype's list holds the elements. Loop over the stereotype you applied.

Report Wizard

One quiet reference can kill the template

$!ref.method($otherRef), a quiet reference with a $ argument, is a syntax error ("Encountered <") that stops the whole template. Drop the !, or pass a plain string argument.

Report Wizard

Table rows need #forrow

A plain #foreach inside a Word table row runs inline and crams everything into one row. Use #forrow … #endrow. It adds a row for every item, even ones an #if skips, so build the list first with $array.createArray().

Report Wizard

Dates and images

$report.currentDate no longer works: use $date or $date.get("MMMM dd, yyyy"). Diagram images come from $d.image. In an HTML template it returns a file path, so wrap it in an <img> tag.

Report Wizard

Blank lines print

Every blank line in a template becomes a blank line in the output. Keep the VTL tight, and use Word's highlight color to mark where a loop or macro ends.

Derived properties

Groovy scripts in derived properties

The element arrives as arg1, not THIS. == doesn't compare model elements by identity, so use a.is(b). A debug column must have Type = String, or the text it returns won't show.

Learn it live

Advanced Topics teaches this in one day

Our 6-hour Advanced Topics course covers derived properties, metachain navigation, model libraries and custom Report Wizard (VTL) templates, hands-on in Cameo on our cloud VM. No license needed.

  • $1,250 remote, $1,500 in person
  • With SysML Fundamentals: $3,600 remote, $4,500 in person
  • Report templates built up step by step against the Robot Mower model you build in Fundamentals

Reading

  • What are derived properties in Cameo, and why should I care?Live
  • What are the biggest gotchas writing Groovy scripts in Cameo?Publishes Dec 1, 2026
  • How do I debug a derived property that returns nothing?Publishes Feb 2, 2027
  • How do I generate a document from my SysML model?Publishes Mar 16, 2027
  • What is a metachain in Cameo, in plain English?Publishes Mar 30, 2027

Questions

Report Wizard and VTL questions

What is the Cameo Report Wizard?

A built-in tool in Cameo Systems Modeler and CATIA Magic that generates documents from your model. A template decides what goes in the document, and the Wizard fills it with the model's current data, so people without Cameo can read the result.

What is VTL?

The Apache Velocity Template Language. Report Wizard templates are written in it: variables start with $, and directives such as #foreach, #if and #macro start with #.

What formats can Report Wizard produce?

Word, Excel, PowerPoint, HTML and text templates, among others. Report Wizard has no native PDF output, so print a Word or HTML report to PDF.

Where should I start?

With the templates that ship with Cameo. Run one, then open it and read its VTL. They are the best examples of loops, macros and tables. Write your own after that.

Why is my $Class list empty?

Report Wizard lists elements by their stereotype. In a SysML model, blocks show up in $Block and requirements in $Requirement, so $Class can be empty.

Why does my whole template fail with "Encountered <"?

Look for a quiet reference with a $ argument, such as $!ref.method($otherRef). Remove the ! or pass a string argument instead.

What is a metachain?

A chain of navigation steps from one element to related elements, for example from a block to the requirements it satisfies. It powers custom table columns, legends and derived properties without any scripting.

Can you build our report templates for us?

Yes. We build templates for specifications and CDRL deliverables from your model as consulting work, in Cameo 2022x, 2024x or 2026x, and teach your team to maintain them.

CameoMagic is an independent company with no affiliation with, sponsorship by, or endorsement from Dassault Systèmes. CATIA and Cameo are trademarks of Dassault Systèmes or its subsidiaries.

Stop copying model data into documents.

Start with the free videos, download a project file, or learn Report Wizard and metachains hands-on in Advanced Topics.

Prefer email? Write to consulting@cameomagic.com

Ask about report templates

Tell us which documents you need from your model, and we’ll follow up to scope the templates.

What do you need?
Please don't include CUI, export-controlled or classified information.
Please don't include CUI, export-controlled or classified information.