.. . . the ones that want to cut keystrokes not milliseconds off run times. Every so often I'm editing a drawing with an Xref only there for reference. So I'm constantly loading and unloading it throughout the editing session. I wanted a really quick way to load and unload xrefs and thought a shortcut menu like osnaps would be cool - so this is what I came up with: You need to have a partial menu loaded with the menugroup name of "jb40". If you have a custom partial menu just change the menugroup string in the jb:XrefPop routine. ;;; Return a list of Xrefs ;;; use(setq l(jb:ListXrefs)) (defun jb:ListXrefs (/ xreflist) (vlax-for x (vla-get-blocks (vla-get-ActiveDocument (vlax-get-acad-object))) (if (= (vlax-get-property x 'isxref) :vlax-true) (setq xreflist (append xreflist (list (vlax-get-property x 'name)))))) xreflist) ;;; ;;; (setq ret(jb:XrefPop "_unload")) ;;; Returns the Shortcut menu object if found (defun jb:XrefPop (oper / acadobj jbthisdrawing menugrps menu menus shortcut xreflist) (vl-load-com) (setq acadobj (vlax-get-acad-object) jbthisdrawing (vla-get-ActiveDocument acadobj) menugrps (vla-get-menugroups acadobj) menu (vl-catch-all-apply 'vla-item (list menugrps "jb40"))); change the menugroup here ; make sure the menugroup exists (if (not (vl-catch-all-error-p menu)) (progn (setq menus (vla-get-menus menu)) (vlax-for i menus (if (= (vla-get-shortcutmenu i) :vlax-true) ; find the shortcut menu (setq shortcut i))) (if shortcut (progn (vlax-for ii shortcut (vla-delete ii)) ; clean the shortcut menu (setq xreflist (jb:ListXrefs) ; get a list of xrefs cnt 0) ;populate the shortcut menu (foreach x xreflist (vlax-invoke shortcut 'addmenuitem cnt x (strcat "-xref " oper " " (chr 34) x (chr 34) " ")) (setq cnt (1+ cnt))))))) ; return the shortcut menu object so we know to continue popping the menu! shortcut) ;;; Unload (defun c:jbUnloadXrefPop( / ret) (setq ret(jb:XrefPop "_unload")) (if ret (progn(menucmd "P0=jb40.POP0") (menucmd "P0=*")) (alert "Menu not found!"))) ;;; Reload (defun c:jbReloadXrefPop( / ) (setq ret(jb:XrefPop "_reload")) (if ret (progn(menucmd "P0=jb40.POP0") (menucmd "P0=*")) (alert "Menu not found!"))) ;;; Detach (defun c:jbDetachXrefPop( / ) (setq ret(jb:XrefPop "_detach")) (if ret (progn(menucmd "P0=jb40.POP0") (menucmd "P0=*")) (alert "Menu not found!"))) ;;;end I've also got a pop for frozen layers and views. If anyone sees a way to streamline anything, or if I missed localizing a variable let me know - thanks. jb