指定向用户显示的菜单项的内容和格式。 支持的平台:仅窗口 属性值只读:不 类型:字符串 弹出菜单项的标签。 言论与属性不同,此属性可以包含 DIESEL 字符串表达式,这些表达式在每次显示标签时有条件地更改标签。Caption 例子工 务 局: Sub Example_Label() ' This example iterates through the first menu in the menu bar ' and displays the label for each menu item. Dim menuItem As AcadPopupMenuItem Dim menuLabel As String menuLabel = "" For Each menuItem In ThisDrawing.Application.MenuBar.Item(0) menuLabel = menuLabel & menuItem.Label & vbCrLf Next menuItem MsgBox menuLabel End Sub Visual LISP: (vl-load-com) (defun c:Example_Label() ;; This example iterates through the first menu in the menu bar ;; and displays the label for each menu item. (setq acadObj (vlax-get-acad-object)) (setq menuLabel "") (vlax-for menuItem (vla-Item (vla-get-MenuBar acadObj) 0) (setq menuLabel (strcat menuLabel (vla-get-Label menuItem) "\n")) ) (alert menuLabel) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:23
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.