WritePluginInfo Method (ActiveX/CSP)

Creates a new AcStPluginInfo node below the specified node.

Supported platforms: Windows only

Namespace: AcStMgr

Assembly: AcStMgr.tlb

Signature

VB.NET:

Public Sub WritePluginInfo(pPluginInfoSectionNode) _
                    Implements IAcStPlugin2.WritePluginInfo
    ...
End Sub

C#:

public void WritePluginInfo(pPluginInfoSectionNode)
{
    ...;
}
object

Type: IAcStPlugin2 interface

The interface this method applies to.

pPluginInfoSectionNode

Access: Input-only

Type: Object (MSXML2.IXMLDOMNode) object

The AcStPluginInfoSection node which to append a new AcStPluginInfo node.

Return Value (RetVal)

No return value.

Remarks

No additional remarks.

Release Information

Releases: AutoCAD 2004 and later

Examples

VB.NET:

Public Sub WritePluginInfo(ByVal pPluginInfoSectionNode As Object) _
                           Implements IAcStPlugin2.WritePluginInfo

    ' Sets the Section node for the XML file output
    Dim pSectionNode As IXMLDOMNode = pPluginInfoSectionNode

    ' Creates a new element
    Dim xmlElem As IXMLDOMElement = _
        pSectionNode.ownerDocument.createElement("AcStPluginInfo")

    ' Appends the new element to the XMl file
    Dim pPluginInfoElement As IXMLDOMElement = _
        pSectionNode.appendChild(xmlElem)

    ' Writes the plug-in information to the XML file
    pPluginInfoElement.setAttribute("PluginName", Name())
    pPluginInfoElement.setAttribute("Version", Version())
    pPluginInfoElement.setAttribute("Description", Description())
    pPluginInfoElement.setAttribute("Author", Author())
    pPluginInfoElement.setAttribute("HRef", HRef())
    pPluginInfoElement.setAttribute("DWSName", "")
    pPluginInfoElement.setAttribute("Status", "1")

    ' Save a reference to the XML document in a global variable to allow additional information
    ' to be added to the XML file
    m_xmlDoc = pSectionNode.ownerDocument
End Sub

C#:

public void WritePluginInfo(object pPluginInfoSectionNode)
{
    // Sets the Section node for the XML file output
    IXMLDOMNode pSectionNode = (IXMLDOMNode)pPluginInfoSectionNode;

    // Creates a new element
    IXMLDOMElement xmlElem = pSectionNode.ownerDocument.createElement("AcStPluginInfo");

    // Appends the new element to the XMl file
    IXMLDOMElement pPluginInfoElement = (IXMLDOMElement)pSectionNode.appendChild(xmlElem);

    // Writes the plug-in information to the XML file
    pPluginInfoElement.setAttribute("PluginName", Name);
    pPluginInfoElement.setAttribute("Version", Version);
    pPluginInfoElement.setAttribute("Description", Description);
    pPluginInfoElement.setAttribute("Author", Author);
    pPluginInfoElement.setAttribute("HRef", HRef);
    pPluginInfoElement.setAttribute("DWSName", "");
    pPluginInfoElement.setAttribute("Status", "1");

    // Save a reference to the XML document in a global variable to allow additional information
    // to be added to the XML file
    m_xmlDoc = pSectionNode.ownerDocument;
}