Specifies the units for the display of layout or plot configuration properties.
Supported platforms: Windows only
VBA:
object.PaperUnits
Type: Layout, PlotConfiguration
The objects this property applies to.
Read-only: No
Type: acPlotPaperUnits enum
This property determines the units for the display of the layout or plot configuration in the user interface. This property does not determine the units for input or query of the ActiveX Automation properties. All ActiveX Automation properties are represented in millimeters or radians, regardless of the units settings.
Changes to this property will not be visible until after a regeneration of the drawing. Use the Regen method to regenerate the drawing.
VBA:
Sub Example_PaperUnits() ' This example will access the Layouts collection for the current drawing ' and list basic information about the paper units used for each Layout. Dim Layouts As AcadLayouts, Layout As ACADLayout Dim msg As String Dim Measurement As String ' Get layouts collection from document object Set Layouts = ThisDrawing.Layouts msg = vbCrLf ' Start with a space ' Get the paper units information of every layout in this drawing For Each Layout In Layouts ' Using inches or millimeters? Measurement = IIf(Layout.PaperUnits = acInches, " inches", " millimeters") ' Format for display msg = msg & Layout.name & " is using" & Measurement & vbCrLf Next ' Display paper units information MsgBox "The paper units used in the current drawing are: " & msg End Sub
Visual LISP:
(vl-load-com) (defun c:Example_PaperUnits() ;; This example will access the Layouts collection for the current drawing ;; and list basic information about the paper units used for each Layout. (setq acadObj (vlax-get-acad-object)) (setq doc (vla-get-ActiveDocument acadObj)) ;; Get layouts collection from document object (setq Layouts (vla-get-Layouts doc)) (setq msg "" Measurement "") ;; Get the paper units information of every layout in this drawing (vlax-for Layout Layouts ;; Using inches or millimeters? (setq Measurement (if (= (vla-get-PaperUnits Layout) acInches) " inches" " millimeters")) ;; Format for display (setq msg (strcat msg (vla-get-Name Layout) " is using" Measurement "\n")) ) ;; Display paper units information (alert (strcat "The paper units used in the current drawing are: \n" msg)) )