CenterPlot Example |
Using Programming Languages other than VBA
Sub Example_CenterPlot() ' This example will access the Layouts collection for the current drawing ' and display whether the plot for this layout is to be centered on the media. ' It will then toggle the state of CenterPlot for "Layout1" and re-display the ' CenterPlot state for each Layout. Dim Layouts As AcadLayouts, Layout As ACADLayout Dim msg As String Dim IsCentered As String ' Get layouts collection from document object Set Layouts = ThisDrawing.Layouts ' Display current layout information GoSub DISPLAY ' Toggle centered state for Layout1 Layouts("Layout1").PlotType = acDisplay Layouts("Layout1").CenterPlot = Not (Layouts("Layout1").CenterPlot) ThisDrawing.Regen acAllViewports ' Display new layout information GoSub DISPLAY Exit Sub
DISPLAY: msg = "" ' Clear message ' Determine whether this layout is centered on the media during a plot For Each Layout In Layouts IsCentered = IIf(Layout.CenterPlot, " are centered ", " are not centered ") ' Format for display msg = msg & "Objects for " & Layout.name & IsCentered & "on the media during a plot." & vbCrLf Next ' Display layout information MsgBox msg Return End Sub
Comments? |
500 Internal Server Error Internal Server Error
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.