Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/07/2025 in Posts

  1. Another maybe simpler this checks for Close and Save commands. yes got help from a couple of people like Lee-mac. ; by AlanH April 2023 ;Reactor callback function (defun BeginCloseFunc (reactor lst / blocks blk efname ent2 ent3 ole olelst ssole oletit olefound ss ssvft y tabname) (setq tabname (getvar 'ctab)) ; will get "Model" etc ............ do your thing here ........ ............ can call other defuns...... (princ) ) (cond ((= (vlr-current-reaction-name) ':VLR-beginSave) (Princ "\nThis function has been triggered by a Document Save event.")) ((= (vlr-current-reaction-name) ':VLR-beginClose)(princ "\nThis function has been triggered by a Document Close event.")) ) (princ) ) (if (not _BeginCloseReactor) (setq _BeginCloseReactor (VLR-Dwg-Reactor nil '((:VLR-beginClose . BeginCloseFunc))))) (if (not _BeginSaveReactor ) (setq _BeginSaveReactor (VLR-Dwg-Reactor nil '((:VLR-beginSave . BeginCloseFunc)))))
    1 point
  2. Added a few options since the first version for those who like to pimp things. Same restrictons as b4 , text display is very basic , keep them short or use wider buttons , background fill is fine for standard drawings sizes , but very large units can take some time so added option in setup dialog to tweak fill percentage. Very small drawings / zoom factor also impacts fill. But then if I have to live with these limits of lisp , so do you. Very satisfying I can tell you. App can be started with c:GrM (Graphic Menu) , you probably want to fill the app list with your favorite lisp routines and app still works by loading 'MyLisp' and then assumes it starts with (c:MyLisp). Haven't tested it on a virgin system yet so hope it runs on first use. App should display toolbar with default settings and enters a grread loop , there you can select button or press S for setup , O to change orientation (left / right / top / center / bottom) and also do some zooming, oh just read the freaking command prompt. One button(key) isn't listed , D , that was for debugging. Just left it there for those who get off pressing buttons. In setup dialog top left will show if debug mode is active. You probably use it once in you life but it could be a nice template for future apps. You also can directly go to setup dialog with (C:GrMS) Well I could go on but what be the fun in that. If I did my work app should explain itself. My reason for making this is that for every job I do I make my tools on the fly and having to edit / recompile my autocad toolbar every freaking time started to irritate me and now I just pimp my own toolbar / app-list (you can save multiple toolbar data files in the app-list dialog) Well , as you should know by now : hope you have fun or else bite me (or your mother in law) Oh , if you choose center orientation I would advise to use the fixed width / height option ... or not , I'm not your mommie ...daddy? ... maybe... 2025-09-07 : updated a couple of first use issues & added 'hotkey' [C]olor to cycle different colors GrM.lsp
    1 point
×
×
  • Create New...