UpperRightCorner Example |
Using Programming Languages other than VBA
Sub Example_UpperRightCorner() ' This example creates a new viewport and makes it active. ' Then it splits the viewport into 4 windows. ' It then takes finds the upper right corner of each of the ' windows. Dim newViewport As AcadViewport ' Create a new viewport and make it active Set newViewport = ThisDrawing.Viewports.Add("TESTVIEWPORT") ThisDrawing.ActiveViewport = newViewport ' Split the viewport in 4 windows newViewport.Split acViewport4 ' Make the newly split viewport active ThisDrawing.ActiveViewport = newViewport ' Iterate through the viewports. For each viewport, ' make that viewport active and display the coordinates ' of the upper right corner. Dim entry As AcadViewport Dim UpperRight As Variant For Each entry In ThisDrawing.Viewports entry.GridOn = True ThisDrawing.ActiveViewport = entry UpperRight = entry.UpperRightCorner MsgBox "The upper right corner of this viewport is " & UpperRight(0) & ", " & UpperRight(1), , "UpperRightCorner Example" entry.GridOn = False Next End Sub
Comments? |
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster@entercad.forsenergy.ru to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.