SetContext 方法 (ActiveX/CSP)
设置循环访问错误时要检查的对象。 支持的平台:仅限 Windows 命名空间:AcStMgr (英语) 集会:AcStMgr.tlb 签名VB.NET: Public Sub SetContext(objIdArray, bUseDb) _ Implements IAcStPlugin2.SetContext ... End Sub C#: public void SetContext(objIdArray, bUseDb) { ...; }
返回值 (RetVal)无返回值。 言论每次在编辑会话中修改对象(或对象列表)时,都会调用该方法,并且对象类型与插件通过该方法发送到框架的内容匹配。上下文可以是对象列表或 null(表示需要检查整个图形)。设置上下文后,框架将调用 、 和 方法,以遍历当前上下文中的错误。SetContextGetObjectFilterStartNextDone 发行信息释放:AutoCAD 2004 及更高版本
例子VB.NET: Public Sub SetContext(ByVal objIdArray As Object, ByVal bUseDb As Boolean) _ Implements IAcStPlugin2.SetContext ' If useDb is set to "true" (default), or if objIdArray is blank, ' the context is set to the database (all ObjectIds in the drawing). ' Otherwise, the supplied array contains the objects to check. m_ContextList.SetContext(bUseDb, objIdArray) End Sub C#: public void SetContext(object objIdArray, bool bUseDb) { // If useDb is set to "true" (default), or if objIdArray is blank, // the context is set to the database (all ObjectIds in the drawing). // Otherwise, the supplied array contains the objects to check. m_ContextList.SetContext(bUseDb, (Array)objIdArray); } |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2024-12-15 22:19
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.