Reference Data plug-in example
This example describes the importRMSReferences.plugin
, which is used to import file references from Reference Manager Session (RMS) files. RMS files are used by Dassault Systèmes® ICEM Surf™ to save an assembly. The user can then import the data from those references using the Alias Reference Manager.
Usage
The plugin is installed under File > Import, as "Import RMS References". Launching this opens a file browser where the user should select a .RMS file. See below for file format details. That file will be parsed and any Reference values will attempt to be imported as Reference Files in the Alias Reference Manager.
Successfully imported references can then be loaded by using Reference Manager> File > Update All (or Update All from the R icon in the action bar). Only references to Alias-supported file formats can be imported by the Reference Manager. Note that .kddat or .icem files are not supported by the plug-in.
Limitations
This plugin currently only supports adding the references with the supplied file path and transformation. Other entries, such as Variants, are not supported.
RMS file details
RMS is a JSON-like format. It contains a list of nodes defined by a name followed by a value in brackets {}. The value in brackets may contain any number of exactly one of these types:
or False - case sensitive), Numbers (stored as doubles),
- Nested RMSNodes
- Numbers (stored as doubles)
- Boolean values (True or False - case sensitive)
- Strings (in "")
In other words, mixed values are not allowed (so Node{ True 1.5 } would result in an error). The values are separated by spaces or new lines. A # denotes a comment, anything following # on the same line will be ignored.
# Example RMS; formatting examples
StringNode{"a string" "another string"}}
BoolNode{True False }
NumberNode
{
1 3.2 -47
0.4 17
}
NestedNodes
{
SubNode1{ "this has a string"}
SubNode2{ True }
SubNode3{ SubSubNode{ 7 0 1}}
}
Data
{
Name{ "My Data" }
Matrix
{ 1 1 0
3 2.4 0
0 0 -1 }
}
# Example of valid Reference entry
Reference
{
#FilePath is required, must be a string
FilePath{ "path\to\source\file.wire" }
#Transformation is optional
Transformation
{
#Matrix is required for Transformation
#Matrix must have 12 values for valid Transformation
Matrix
{1 0 0 1000
0 1 0 0
0 0 1 100}
}
#Other values are allowed but not handled by this plugin
ActiveList {True}
}