GetPaperSize 方法 (ActiveX)
获取已配置纸张的宽度和高度。 支持的平台:仅限 Windows 签名VBA: object.GetPaperSize Width, Height
返回值 (RetVal)无返回值。 言论宽度和高度值的单位由属性指定。PaperUnits 若要设置纸张大小,请使用属性。CanonicalMediaName 例子VBA: Sub Example_GetPaperSize() ' This example gets the width and height of the default ' paper size for your system. Dim PaperWidth As Double Dim PaperHeight As Double ThisDrawing.ActiveLayout.GetPaperSize PaperWidth, PaperHeight MsgBox "The default paper size is " & vbCrLf & _ "Width: " & PaperWidth & vbCrLf & _ "Height: " & PaperHeight End Sub 可视化 LISP: (vl-load-com) (defun c:Example_GetPaperSize() ;; This example gets the width and height of the default ;; paper size for your system. (setq acadObj (vlax-get-acad-object)) (setq doc (vla-get-ActiveDocument acadObj)) (vla-GetPaperSize (vla-get-ActiveLayout doc) 'PaperWidth 'PaperHeight) (alert (strcat "The default paper size is " "\nWidth: " (rtos PaperWidth 2) "\nHeight: " (rtos PaperHeight 2))) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2024-12-15 22:23
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.