CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

启动方法 (ActiveX/CSP)

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

摘要: 初始化对错误的检查。

初始化对错误的检查。

支持的平台:仅窗口

Namespace:AcStMgr

集会:AcStMgr.tlb

签名 - AcStErrorIterator 对象

仅供内部使用。

VB.NET:

object.Start([bShowIgnored])

C#:

object.Start([bShowIgnored]);
对象

类型:AcStError迭代器对象

此方法适用的对象。

b显示忽略

访问:仅输入

类型:布尔

如果错误被标记为已忽略,

  • False:不允许检查错误
  • True:允许检查错误

签名 - IAcStPlugin2 接口

VB.NET:

Public Sub Start(pStartError) _
                    Implements IAcStPlugin2.Start
    ...
End Sub

C#:

public void Start(pStartError)
{
    ...;
}
对象

类型:IAcSt插件2接口

此方法适用的接口。

p启动错误

访问:仅输入

类型:AcStError对象

要检查的错误对象。

返回值(RetVal)

无返回值。

言论

没有额外的评论。

发布信息

释放:AutoCAD 2004 及更高版本

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

Examples

VB.NET:

Public Sub PlugIn_Start(ByVal pStartError As AcStError) _
                        Implements IAcStPlugin2.Start

    ' pStartError is not an actual programming error that needs to be handled,
    ' but a reference to an object that does not match the standards
    ' in the DWS file.

    ' If pStartError is an object, checking should start
    ' from that error, not the beginning of the current context.
    If IsNothing(pStartError) = False Then

        ' Get the ObjectId of the first object to check
        Dim badId As Long = pStartError.BadObjectId

        ' Find the index for ObjectId in the context list stored in m_objIDArray
        For m_curIndex = 0 To m_ContextList.Count - 1
            If m_ContextList.Item(m_curIndex) = badId Then
                m_curIndex = m_curIndex - 1
                PlugIn_Next()
            End If
        Next
    Else
        ' A valid AcStError object was not passed to the method.
        ' Checking should start at the beginning of the context list.
        m_curIndex = -1
        PlugIn_Next()
    End If
End Sub

C#:

public void PlugIn_Start(AcStError pStartError)
{
    // pStartError is not an actual programming error that needs to be handled,
    // but a reference to an object that does not match the standards
    // in the DWS file.

    // If pStartError is an object, checking should start
    // from that error, not the beginning of the current context.
    if ((pStartError == null) == false)
    {
        // Get the ObjectId of the first object to check
        long badId = pStartError.BadObjectId;

        // Find the index for ObjectId in the context list stored in m_objIDArray
        for (m_curIndex = 0; m_curIndex <= m_ContextList.Count - 1; m_curIndex++)
        {
            if (Convert.ToInt64(m_ContextList.GetItem(m_curIndex)) == badId)
            {
                m_curIndex = m_curIndex - 1;
                PlugIn_Next();
            }
        }
    }
    else
    {
        // A valid AcStError object was not passed to the method.
        // Checking should start at the beginning of the context list.
        m_curIndex = -1;
        PlugIn_Next();
    }
}

void IAcStPlugin2.Start(AcStError pStartError)
{
    PlugIn_Start(pStartError);
}

路过

雷人

握手

鲜花

鸡蛋

最新评论

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

GMT+8, 2024-5-19 16:18

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部