指定其特性与要与之进行比较的图形标准文件中定义的特性不匹配的对象的对象 ID。 支持的平台:仅窗口 Namespace:AcStMgr 集会:AcStMgr.tlb 属性值只读:不 类型:长PTR (长) 与错误关联的对象的对象 ID。 言论没有额外的评论。 发布信息释放:AutoCAD 2004 及更高版本
例子VB.NET: Public Sub PlugIn_Start(ByVal pStartError As AcStError) _ Implements IAcStPlugin2.Start ' 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) { // 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(); } } |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:20
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.