CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

AutoCAD 2019 开发者帮助

Clear 方法 (ActiveX/CSP)

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

Clear 方法 (ActiveX/CSP)

在从内存中释放插件或用于清除任何缓存的错误之前触发。

支持的平台:仅限 Windows

命名空间:AcStMgr (英语)

集会:AcStMgr.tlb

签名 - AcStErrorIterator 对象

仅供内部使用。

VB.NET:

object.Clear()

C#:

object.Clear();
对象

类型:AcStErrorIterator 对象

此方法应用到的对象。

签名 - IAcStPlugin2 接口

VB.NET:

Public Sub Clear() _
                Implements AcStMgr.IAcStPlugin2.Clear 
    ...
End Sub

C#:

public void Clear()
{
    ...
}
对象

类型:IAcStPlugin2 接口

此方法适用的接口。

返回值 (RetVal)

无返回值。

言论

没有其他评论。

发行信息

释放:AutoCAD 2004 及更高版本

  • AcStMgr.tlb - AutoCAD 2004 及更高版本

示例 - AcStErrorIterator 对象

VB.NET:

Not available

C#:

Not available

示例 - IAcStPlugin2 接口

VB.NET:

Public Sub PlugIn_Clear() Implements IAcStPlugin2.Clear

    ' If the XML Document object exist, the plug-in is being used by the Batch Standards Checker.
    ' Output the standards items that were used for comparison to the Standards Items section.
    If IsNothing(m_xmlDoc) = False Then
        WriteStandardsItemsInfo()
    End If

    ' Clean up the global variables
    m_xmlDoc = Nothing
    m_pPlugin = Nothing
    m_curIndex = -1
    m_RecommendedFixIndex = -1
    m_FixCnt = 0
    m_pManager = Nothing
    m_pDWSDatabase = Nothing
    m_pCheckDatabase = Nothing

    If IsNothing(m_pError) = False Then
        m_pError.Reset()
        m_pError = Nothing
    End If

    ' << Change based on standards implementation >>
    If IsNothing(m_LayerCacheArray) = False Then
        Dim i As Integer
        For i = 0 To UBound(m_LayerCacheArray)
            If IsDBNull(m_LayerCacheArray(i).StandardsFix) = False Then
                m_LayerCacheArray(i).StandardsFix.Reset()
                m_LayerCacheArray(i).StandardsFix = Nothing
            End If
        Next
        Erase m_LayerCacheArray
    End If

    If IsNothing(m_FixArray) = False Then
        Erase m_FixArray
    End If

    m_ContextList.Clear()
End Sub

C#:

public void PlugIn_Clear()
{
    // If the XML Document object exist, the plug-in is being used by the Batch Standards Checker.
    // Output the standards items that were used for comparison to the Standards Items section.
    if ((m_xmlDoc == null) == false)
    {
        WriteStandardsItemsInfo();
    }

    // Clean up the global variables
    m_xmlDoc = null;
    m_pPlugin = null;
    m_curIndex = -1;
    m_RecommendedFixIndex = -1;
    m_FixCnt = 0;
    m_pManager = null;
    m_pDWSDatabase = null;
    m_pCheckDatabase = null;

    if ((m_pError == null) == false)
    {
        m_pError.Reset();
        m_pError = null;
    }

    // << Change based on standards implementation >>
    if ((m_LayerCacheArray == null) == false)
    {
        int i = 0;

        int nLBound = m_LayerCacheArray.GetLowerBound(0);
        int nUBound = m_LayerCacheArray.GetUpperBound(0);

        for (i = 0; i <= nUBound; i++)
        {
            if (m_LayerCacheArray[i].StandardsFix != null)
            {
                m_LayerCacheArray[i].StandardsFix.Reset();
                m_LayerCacheArray[i].StandardsFix = null;
            }
        }
        m_LayerCacheArray = null;
    }

    if ((m_FixArray == null) == false)
    {
        m_FixArray = null;
    }

    m_ContextList.Clear();
}

void IAcStPlugin2.Clear()
{
    PlugIn_Clear();
}

路过

雷人

握手

鲜花

鸡蛋

最新评论

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

GMT+8, 2024-12-15 11:53

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部