获取已配置纸张的宽度和高度。 支持的平台:仅窗口 签名工 务 局: object.GetPaperSize Width, Height 返回值(RetVal)无返回值。 言论宽度和高度值的单位由属性指定。PaperUnits 若要设置纸张大小,请使用该属性。CanonicalMediaName 例子工 务 局: 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
Visual 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, 2025-10-29 08:43
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.