RTML 2.3 Generator and Importer Engine (.NET and COM)
Programmer's Reference

Written by Robert B. Denny (DC-3 Dreams, SP)
Revised 10-Dec-2014 (see Release Notes)

Sample RTML Generator in VB.NET
Sample RTML Generator in VBScript
RTML 2.3 XML Schema full diagram

Introduction

This document describes the .NET/COM RTML 2.3 generator and importer component. This component provides an object-oriented scriptable interface for creating and reading Remote Telescope Markup Language 2.3 documents. These documents are structured according to the Extensible Markup Language (XML) standards, and must also be structured according the the RTML 2.3 XML Schema. It is beyond the scope of this document to further explain XML and XML Schemas. The implementation of the object model is in C#.NET, and is a result of the Liquid XML 2014 Data Binder tool. The Application Programming Interface described here is accessible from both Windows COM and also as a .NET assembly class library.

IntelliSense Information

The Liquid generator tool creates a lot of "generic" properties and methods beyond those that implement the RTML Schema. You will see these while working with this object model in a development environment that provides IntelliSense (Visual Studio, PrimalScript, Visual Basic 6, Microsoft Office VBA, etc.). There isn't a practical way to hide these members from the Classes, so just be aware of them and ignore them while writing your code.

Using From Windows Script or Other COM Clients (MS Office, etc)

For the most part, the classes provided are compatible across .NET and COM, but the three collection classes (Requests, Targets, and Pictures) are not. From COM, to enumerate or retrieve items from the Requests, Targets, or Pictures collections, you must use their COM compatible members, RequestsC, TargetsC, and PicturesC.

Creating RTML Documents

To create an RTML document, start by creating an instance of RTML, then add one or more Request objects to the RTML.Requests collection. Each Request object must be created before adding it to the RTML.Requests collection, and it in turn must have one or more Target objects added to its Request.Targets collection. Each Target object must be created before adding it to the Request.Targets collection, and it in turn must have one or more Picture objects added to its Target.Pictures collection. There are a number of other objects that can be attached to Request, Target, and Picture objects.

Thus, the various objects implemented by RTML 2.3 wrapper form a "tree" which mirrors the RTML 2.3 schema, with the inclusion of a few "collection" and "switcher" classes. All of the object and property names are the same as the RTML 2.3 XML element and attribute names, except the attribute names begin with capital letters in the API. See the following for additional insight:

Sample RTML Generator in VB.NET
Sample RTML Generator in VBScript
RTML 2.3 XML Schema full diagram