CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

布局属性 (ActiveX)

2023-1-3 12:42| 发布者: admin| 查看: 463| 评论: 0|来自: AutoCAD

摘要: 指定与模型空间、图纸空间或块对象关联的布局。

指定与模型空间、图纸空间或块对象关联的布局。

支持的平台:仅窗口

签名

工 务 局:

object.Layout
对象

类型:模型空间,图纸空间

此属性适用的对象。

属性值

只读:

类型:布局

与模型空间、图纸空间或块对象关联的布局。

言论

对象包含模型空间、图纸空间或块对象的打印设置。Layout

与给定块无关的命名打印设置将存储为对象。PlotConfiguration

例子

工 务 局:

Sub Example_Layout()
    ' This example references the Layout object obtained from model space.
    ' We then display information from the Layout object.
    
    Dim Layout As ACADLayout
    
    ' Attach to Layout object
    Set Layout = ThisDrawing.ModelSpace.Layout
    MsgBox "We now have access to the properties and methods of the model space Layout object!"
    
    ' Retrieve the name of the model space Layout
    MsgBox "The name of the model space Layout is: " & Layout.name

End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_Layout()
    ;; This example references the Layout object obtained from model space.
    ;; We then display information from the Layout object.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))    
    
    ;; Attach to Layout object
    (setq Layout (vla-get-Layout (vla-get-ModelSpace doc)))
    (alert "We now have access to the properties and methods of the model space Layout object!")
    
    ;; Retrieve the name of the model space Layout
    (alert (strcat "The name of the model space Layout is: " (vla-get-Name Layout.name)))
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

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

GMT+8, 2024-5-12 08:55

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部