サブ メニューに関連付けられたポップアップ メニューを取得します。
サポートされているプラットフォーム: Windows のみ
ポップアップ メニュー項目がサブ メニューではない場合、このプロパティはエラーを戻します。
VBA:
Sub Example_SubMenu() ' This example finds the menu used as the sub menu for the ' "Additional Resources" menu item in the Help menu. Dim acadMenuGroup As acadMenuGroup Set acadMenuGroup = ThisDrawing.Application.MenuGroups.Item("ACAD") Dim helpMenu As AcadPopupMenu Set helpMenu = acadMenuGroup.Menus.Item("&Help") Dim menuItem As AcadPopupMenuItem Set menuItem = helpMenu.Item(4) Dim subMenu As AcadPopupMenu Set subMenu = menuItem.subMenu MsgBox "The name of the submenu is " & subMenu.TagString End Sub
Visual LISP:
(vl-load-com) (defun c:Example_SubMenu() ;; This example finds the menu used as the sub menu for the ;; "Additional Resources" menu item in the Help menu. (setq acadObj (vlax-get-acad-object)) (setq acadMenuGroup (vla-Item (vla-get-MenuGroups acadObj) "ACAD")) (setq helpMenu (vla-Item (vla-get-Menus acadMenuGroup) "&Help")) (setq menuItem (vla-Item helpMenu 4)) (setq subMenu (vla-get-SubMenu menuItem)) (alert (strcat "The name of the submenu is " (vla-get-TagString subMenu))) )