IStyleSheet.Save

Syntax

Save(Element: IXMLDOMElement);

Parameters

Element. XML element, to which styles table is saved.

Description

The Save method saves styles table as an XML code.

Comments

To load styles table from XML code, use the IStyleSheet.Load method.

Example

Executing the example requires that the repository contains a styles table with the STYLE_TB identifier.

Add links to the Drawing, Metabase system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    styleSheet: IStyleSheet;
    Doc: FreeThreadedDOMDocument60;
    Element: IXmlDomElement;
Begin
    // Get current repository
    mb := MetabaseClass.Active;
    // Get styles table
    styleSheet := mb.ItemById("STYLE_TB").Bind As IStyleSheet;
    // Load styles table into XML file
    Doc := New FreeThreadedDOMDocument60.Create;
    Element := Doc.createElement("StyleSheet");
    styleSheet.Save(Element);
    Doc.appendChild(Element);
    Doc.save("C:\StyleSheet.xml");
End Sub UserProc;

After executing the example the STYLE_TB styles table is saved to the C:\StyleSheet.xml file.

See also:

IStyleSheet