CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

AutoCAD 2023 开发者帮助

WritePluginInfo 方法 (ActiveX/CSP)

2024-5-18 18:58| 发布者: admin| 查看: 132| 评论: 0|原作者: admin|来自: AutoCAD

WritePluginInfo 方法 (ActiveX/CSP)

在指定节点下创建一个新节点。AcStPluginInfo

支持的平台:仅限 Windows

命名空间:AcStMgr (英语)

集会:AcStMgr.tlb

签名

VB.NET:

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

C#:

public void WritePluginInfo(pPluginInfoSectionNode)
{
    ...;
}
对象

类型:IAcStPlugin2 接口

此方法适用的接口。

pPluginInfoSectionNode

访问:仅输入

类型:对象 () 对象MSXML2.IXMLDOMNode

要追加新节点的节点。AcStPluginInfoSectionAcStPluginInfo

返回值 (RetVal)

无返回值。

言论

没有其他评论。

发行信息

释放:AutoCAD 2004 及更高版本

  • AcStMgr.tlb - 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;
}

路过

雷人

握手

鲜花

鸡蛋

最新评论

QQ|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1   苏公网安备32011402011833)

GMT+8, 2025-3-14 06:07

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部