Tekvel Magic
Loading...
Searching...
No Matches
SCL

Common SCL-file manipulation class.

Common SCL-file manipulation class. The SCL class provides a variety of functions for manipulating SCL files, including specialized classes like SSD, ICD, and SCD that inherit from the SCL class and offer file-type-specific functionalities.

Typically, the SCL class is initialized with an existing SCL file that can be loaded from a file path as shown in the example below.

Example usage of SCL class:

1scl = SCL("path/to/scl/file")

The SCL class defaults to using Edition 2 of the SCL specification. If you need to work with SCL files of other editions, such as Edition 1 or Edition 2.1, you can specify the edition when initializing the class. The edition identifiers must be passed as strings, not integers.

1scl = SCL("path/to/scl/file", edition="1")

To select an SCL file directly from the filesystem using a graphical dialog, the Dialog class offers convenient functions for file selection, as shown below:

1scd_filepath = Dialog.open_scl_file()
2scl = SCL(scd_filepath)

For more information on SCL-related dialogs, refer to the Dialog class documentation.

You can instantiate multiple SCL objects simultaneously to manipulate different SCL files, including file comparison.

1scl1 = SCL("path/to/scl/file1")
2scl2 = SCL("path/to/scl/file2")
Note
When initialized with an SCL file path, the SCL class parses the file and creates an XML DOM model for further use. No additional operations, such as validation, are performed by default. To validate an SCL file against its schema, you must explicitly call the validate() method within your test script if required.