WritePluginInfo 方法 (ActiveX/CSP) 
在指定节点下创建一个新节点。AcStPluginInfo 支持的平台:仅限 Windows 命名空间:AcStMgr (英语) 集会:AcStMgr.tlb 签名VB.NET: Public Sub WritePluginInfo(pPluginInfoSectionNode) _
                    Implements IAcStPlugin2.WritePluginInfo
    ...
End Sub
C#: public void WritePluginInfo(pPluginInfoSectionNode)
{
    ...;
}
 返回值 (RetVal)无返回值。 言论没有其他评论。 发行信息释放:AutoCAD 2004 及更高版本 
 例子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;
}
 | 
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1   苏公网安备32011402011833)
GMT+8, 2025-11-4 15:11
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.