Report for Chains

Chains are a great way in 12d Model to automate and speed-up repetitive tasks and can also be used to standardise processes.  I’ve espoused some of their many benefits in my previous post, Introduction to Chains, so please read that if you’re not aware of what they are or how much they can improve your efficiency in 12d.

However, with greater use of and complexity in chains, users often would like a way to view all the information about a chain.  There is no current inbuilt way to produce a report for chains with such information, so I’ve created one.

Since the newer chains- from V10 onwards, with the .chain extension- are XML-based and all information of the chain is contained in that XML, it is possible to write an XSLT and extract and transform the information from that into a report for chains.

There are 2 formats for the chain file. The earlier chain files in V8 and V9 were saved in a plain-text format, though the layout of this format was quite obscure and difficult to read. In V10, chains were changed to an XML-based format that is easier to read and allows for greater flexibility in adding more features in the future. You can easily tell the difference between the two formats by their extension- earlier, non-XML chains have an extension of .rcn, the newer, XML-based chains have an extension of .chain.

So, enough with the preamble, you just want to get your hands on it and run it, don’t you? 🙂

Here’s how you can download and use this report for chains:

  1. Download the XSLTs (both or either) at the bottom of this post.
  2. Save them to one of the standard 12d search locations.  I’d recommend either the User Library or Customer Library locations.
  3. To produce a report, from within 12d Model, go to Report→Utilities→Xml translate .
    A screenshot showing a blank panel of the XML Translate option in 12d Model (Report→Utilities→Xml Translate).
    A screenshot showing a blank panel of the XML Translate option in 12d Model (Report→Utilities→Xml Translate).
  4. For the Xml file field, you’ll need to Browse for the chain, since the field defaults to listing .xml files and not .chain files (you can also type *.chain in the field and hit enter to get a list of files in the current working directory).
  5. For the Translation file field, select either of the XSLTs you downloaded in Step 1.
  6. For the Report type field, I’d recommend choosing htm for the HTML report template and csv for the CSV report template (seems logical enough).
  7. For the Output file field, type in any new file name you’d like for your chain report.
  8. Once all that’s done, click the Report button and wait until it’s finished.

    An example of a filled-out Xml Translate panel for reporting of chains.
    An example of a filled-out Xml Translate panel for reporting of chains.
  9. The default program for the HTML and CSV report types (e.g. web browser and MS Excel, respectively) should open the file automatically, once completed. 

That’s all there is to it. A few points to mention about these:

  • Not all information from the chain is reported, just the most important fields.
  • There are some settings that you can change to alter the appearance of these reports. Open up the XSLT files in a text editor and read through the comments.
  • This doesn’t do any recursion (i.e. processing chains called from chains). It also doesn’t work on parameter files (PVFs) (though, you could easily create a similar template for those, too).

You can also generate the report for chains from the command line or batch file by passing the required parameters directly to the XmlTransform.exe shipped with 12d Model.  I won’t discuss how to do so here, but if you’re interested, let me know in the comments and I’ll give you more info.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.