- Function GetActiveSpace() As AcadBlock
- Dim objSpace As AcadBlock
- With ThisDrawing
- If .ActiveSpace = acModelSpace Then
- Set objSpace = .ModelSpace
- Else
- If .MSpace = False Then
- Set objSpace = .PaperSpace
- Else
- Set objSpace = .ModelSpace
- End If
- End If
- End With
- Set GetActiveSpace = objSpace
- End Function
- Sub GetSpaceSample()
- MsgBox "当前空间为: " & GetActiveSpace.Name, , "明经通道VBA示例"
- End Sub
|