CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

AutoCAD 2020 开发者帮助

UseStandardScale 属性 (ActiveX)

2024-5-18 18:22| 发布者: admin| 查看: 95| 评论: 0|原作者: admin|来自: AutoCAD

UseStandardScale 属性 (ActiveX)

指定绘图是使用标准比例还是自定义比例。

支持的平台:仅限 Windows

签名

VBA:

object.UseStandardScale
对象

类型:布局PlotConfiguration

此属性应用于的对象。

属性值

只读:

类型:布尔

  • True:使用标准比例绘制。
  • False:使用自定义比例进行打印。

言论

若要指定要在绘图中使用的标准比例,请使用该属性。若要指定自定义比例,请使用该方法。StandardScaleSetCustomScale

例子

VBA:

Sub Example_UseStandardScale()
    ' This example will access the Layouts collection for the current drawing
    ' and list the status of UseStandardScale for each Layout.

    Dim Layouts As AcadLayouts, Layout As ACADLayout
    Dim msg As String
    
    ' Get layouts collection from document object
    Set Layouts = ThisDrawing.Layouts
    
    msg = ""
    
    ' Get the UseStandardScale information of every layout in this drawing
    For Each Layout In Layouts
        If Layout.UseStandardScale Then
            msg = msg & Layout.name & " uses the standard scale." & vbCrLf
        Else
            msg = msg & Layout.name & " uses a custom scale." & vbCrLf
        End If
    Next
    
    ' Display the information
    MsgBox msg
End Sub

可视化 LISP:

(vl-load-com)
(defun c:Example_UseStandardScale()
    ;; This example will access the Layouts collection for the current drawing
    ;; and list the status of UseStandardScale 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)
          msg "")
    
    ;; Get the UseStandardScale information of every layout in this drawing
    (vlax-for Layout Layouts
        (if (= (vla-get-UseStandardScale Layout) :vlax-true)
            (setq msg (strcat msg (vla-get-Name Layout) " uses the standard scale.\n"))
            (setq msg (strcat msg (vla-get-Name Layout) " uses a custom scale.\n"))
        )
    )
    
    ;; Display the information
    (alert msg)
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

QQ|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1   苏公网安备32011402011833)

GMT+8, 2024-12-16 00:04

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部