本帖最后由 作者 于 2008-7-26 23:36:35 编辑
Sub ViewPort_Default(ByRef Center() As Double, ByRef Width As Double, ByRef Height As Double) ''修改默认的视口属性 Dim pViewPortObj As Object AcadObj.ActiveDocument.ActiveSpace = acPaperSpace ''获取当前的视口为活动视口 Set pViewPortObj = AcadObj.ActiveDocument.ActivePViewport ''修改当前的视口 pViewPortObj.Center = Center pViewPortObj.Height = Height pViewPortObj.Width = Width pViewPortObj.CustomScale = 1 pViewPortObj.DisplayLocked = True ''重新被设为口活动视口 Set AcadObj.ActiveDocument.ActivePViewport = pViewPortObj End Sub |