CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

标题属性 (ActiveX)

2023-1-3 20:58| 发布者: admin| 查看: 432| 评论: 0|来自: AutoCAD

摘要: 获取用户看到的应用程序或菜单项显示的文本。

获取用户看到的应用程序或菜单项显示的文本。

支持的平台:仅窗口

签名

工 务 局:

object.Caption
对象

类型:应用程序弹出菜单项

此属性适用的对象。

属性值

只读:否(对象除外)PopupMenuItem

类型:字符串

显示在 AutoCAD 应用程序窗口中的标题或弹出菜单上的菜单项的标题。

言论

对于菜单项,此属性是只读的,通过删除任何 DIESEL 字符串表达式从该属性派生。Label

例子

工 务 局:

Sub Example_Caption()
    ' This example returns the caption for the current
    ' AutoCAD session.
    
    ' Get the Caption property
    Dim strCaption As String
    strCaption = ThisDrawing.Application.Caption
    MsgBox "The caption for this session is " & ThisDrawing.Application.Caption, , "Caption Example"
    
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_Caption()
    ;; This example returns the caption for the current
    ;; AutoCAD session.
    (setq acadObj (vlax-get-acad-object))
    
    ;; Get the Caption property
    (setq strCaption (vla-get-Caption acadObj))
    (alert (strcat "The caption for this session is " strCaption))
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

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

GMT+8, 2024-5-12 14:18

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部