mrScript MDSC: Writing mrScriptMetadata
mrScript MDSC can write an MDM document to a mrScriptMetadata file. However, there are a number of limitations. The main limitations are:
Custom properties. These are written for the current user context only. Custom properties defined in other user contexts are ignored.
Texts. These are written for the current language, user context, and label type only. Texts defined in other languages, user contexts, and label types are ignored.
Note that mrScript MDSC writes the most compact code that is possible. For example, mrScript MDSC does not write keywords that are on by default or a label that is identical to the name (because if the label is not specified, it will default to the name). This means that if you use mrScript MDSC to write immediately after reading an existing mrScriptMetadata file, the new code might be slightly different to the old code. However, when the new code is read, it should produce exactly the same metadata.
In UNICOM Intelligence Data Model, mrScript MDSC can write the mrScriptMetadata code for an individual MDM object when an individual object (rather than an entire MDM document) is passed to the MDSC programmatically. The MDM object must be a field object (such as a Variable, Grid, or Array object). The code for an individual object is sometimes called a "scriptlet".
When writing code for an individual MDM object rather than an entire MDM document, mrScript MDSC does not enclose the code within the Metadata and End Metadata section header and footer. This means that the code cannot be read back into mrScript MDSC without first inserting it into a Metadata section, because mrScript MDSC requires the presence of a Metadata section header and footer when reading mrScriptMetadata. In addition, the code for individual Element and Elements objects can be read only if they are attached to a valid field and there might be problems if the code references defined lists that exist in the MDM document but are not defined in the mrScriptMetadata code being read.
See also