CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

WritePluginInfo Method (ActiveX/CSP)

2023-1-2 20:07| 发布者: admin| 查看: 144| 评论: 0|来自: AutoCAD

摘要: 在指定节点下创建一个新的 AcStPluginInfo 节点。

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

支持的平台:仅窗口

Namespace:AcStMgr

集会:AcStMgr.tlb

签名

VB.NET:

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

C#:

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

类型:IAcSt插件2接口

此方法适用的接口。

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 )

GMT+8, 2024-5-12 00:09

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部