ModelSpaceProxy 属性 (ActiveX/CSP)
返回可用于循环访问其模型空间的数据库的模型空间代理。 支持的平台:仅限 Windows 命名空间:AcStMgr (英语) 集会:AcStMgr.tlb 签名VB.NET: object.ModelSpaceProxy(pDb) C#: object.get_ModelSpaceProxy(pDb);
言论没有其他评论。 发行信息释放:AutoCAD 2004 及更高版本
例子VB.NET: Public Sub SetupForAudit(ByVal pDb As AcadDatabase, _ ByVal szPathName As String, _ ByVal stdNameArray As Object, _ ByVal stdPathArray As Object, _ ByVal stdDbArray As Object) _ Implements IAcStPlugin2.SetupForAudit ' Number of graphical objects contained in model space and paper space of ' the database being checked If Not IsNothing(pDb) Then Dim msProxy As IAcStBlockProxy = m_pManager.ModelSpaceProxy(pDb) Dim psProxy As IAcStBlockProxy = m_pManager.PaperSpaceProxy(pDb) Debug.Print("Object counts " & vbLf & "Model: " & msProxy.Count.ToString() & vbLf & "Paper: " & psProxy.Count.ToString()) End If End Sub C#: public void SetupForAudit(AcadDatabase pDb, string szPathName, object stdNameArray, object stdPathArray, object stdDbArray) { // Number of graphical objects contained in model space and paper space of // the database being checked if (pDb != null) { IAcStBlockProxy msProxy = m_pManager.get_ModelSpaceProxy(pDb); IAcStBlockProxy psProxy = m_pManager.get_PaperSpaceProxy(pDb); Debug.Print("Object counts \nModel: " + msProxy.Count.ToString() + "\nPaper: " + psProxy.Count.ToString()); } } |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2024-12-16 00:07
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.