PellaCAD
2008-05-14, 08:07 PM
Could you help me with a quick question please...!!!
How in the name of all that's holy and good can I use VB.NET to select the one and only viewport in my freshly inserted layout?
Been trying once again for DAYS...mixed minimal results, no real luck.
'------------------------------------------------------------------------------------
Dim vport
Dim vportCounter = 0
For Each vport In objAcad.ActiveDocument.Viewports
vportCounter = vportCounter + 1
Next
objAcad.ActiveDocument.ActiveViewport = objAcad.ActiveDocument.Viewports.Item(vportCounter - 1) '...THIS DOES NOT WORK!
objAcad.ActiveDocument.SendCommand("zoom extents ") '...THIS WORKS!!!
'------------------------------------------------------------------------------------
Moderator Note:
Please use [ CODE ] tags... (http://forums.augi.com/misc.php?do=bbcode#code)
How in the name of all that's holy and good can I use VB.NET to select the one and only viewport in my freshly inserted layout?
Been trying once again for DAYS...mixed minimal results, no real luck.
'------------------------------------------------------------------------------------
Dim vport
Dim vportCounter = 0
For Each vport In objAcad.ActiveDocument.Viewports
vportCounter = vportCounter + 1
Next
objAcad.ActiveDocument.ActiveViewport = objAcad.ActiveDocument.Viewports.Item(vportCounter - 1) '...THIS DOES NOT WORK!
objAcad.ActiveDocument.SendCommand("zoom extents ") '...THIS WORKS!!!
'------------------------------------------------------------------------------------
Moderator Note:
Please use [ CODE ] tags... (http://forums.augi.com/misc.php?do=bbcode#code)