这是一段加载菜单的代码,照葫芦画瓢能做到么? ;加载菜单 (defun XG_MNU_LOAD ( / grp mnus file mnu tbars tbar) (setq grp "XG") (setq mnus (vlax-get-property *ax:AcadObject* 'MenuGroups)) (if (vl-catch-all-error-p (vl-catch-all-apply 'vla-Item (list mnus grp))) (if (setq file (findfile "XG_TOOLBAR.mnu")) (vlax-invoke-method mnus 'Load file) ); );if (if (not (vl-catch-all-error-p (setq mnu (vl-catch-all-apply 'vla-Item (list mnus grp))))) (progn (setq tbars (vlax-get-property mnu 'Toolbars)) (if (not (vl-catch-all-error-p (setq tbar (vl-catch-all-apply 'vla-Item (list tbars "1:500地形图修改工具"))))) (vlax-put-property tbar 'Visible :vlax-true) );if ) );if )
|