MarcoW Posted March 30, 2010 Share Posted March 30, 2010 Hi everybody, I know Toolpalettes are supposed to be created with minimal programming skills. That I agree and I do create them this way . However; I use some quite a lot of handy routines (when clicking a button on a toolpalette) that are fired up by macro(s). Some of those macros get very long. Some among us would say that this is not the way to do so but okay. To make a toolpalette working there is a lot of work to copy and paste everything in its way, images, commands, macro's, etc. In my situation, I have been using *.mnu files for a long time. Even now I still use them. The most of the macro's come from these files. I have made them once and still use them with great use. When modifying *.mnu files I do it by using notepad. I can get around pretty good. It is a fast way to modify one or more macro's in notepad. Think of the options like copy / paste / find text / replace text etc. Now I was wondering if toolpalettes could be made / modified in a same way? SOmeone got experience with that? If I open the *.atc file (palette file) I see some kind of code but I cannot tell what it is, PHP or so... Any tips / brainstorm is appreciated. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted March 30, 2010 Share Posted March 30, 2010 Toolbars can be manipulated through VL, you can add buttons & separators, modify macros/bitmaps etc As a quick example, you can retrieve the macros for a toolbar item using something like this: (defun GetMacros (tNme / lst) (vl-load-com) (vlax-for Men (vla-get-MenuGroups (vlax-get-acad-object)) (vlax-for tObj (vla-get-Toolbars Men) (if (eq tNme (vla-get-Name tObj)) (vlax-for bObj tObj (setq lst (cons (vla-get-Macro bObj) lst)))))) (vl-remove "" (reverse lst))) (defun c:test nil (princ (vl-princ-to-string (GetMacros "Object Snap"))) (princ)) Test function included for ObjectSnap toolbar. Quote Link to comment Share on other sites More sharing options...
MarcoW Posted March 30, 2010 Author Share Posted March 30, 2010 Lee, Thanks for the quick reply! Just a question, you are talking about toolbars, I mean toolpalettes. We are not talking about the same ...? CU. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted March 30, 2010 Share Posted March 30, 2010 Perhaps I have misunderstood Quote Link to comment Share on other sites More sharing options...
alanjt Posted March 30, 2010 Share Posted March 30, 2010 Perhaps I have misunderstood Type TP and you'll see what he's talking about. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted March 30, 2010 Share Posted March 30, 2010 Thanks Alan, those are pretty cool I wish I had the CAD experience to go along with the LISP exprience - just looked at the 'Leaders' Tool Palette in 2010 - I can't believe how many options there are, and to think, I have made LISP's for many of those options available. Lee Quote Link to comment Share on other sites More sharing options...
Pablo Ferral Posted March 30, 2010 Share Posted March 30, 2010 Tool pallettes use XML. Try Microsoft XML note pad (... on a copy of your atc file!) Quote Link to comment Share on other sites More sharing options...
alanjt Posted March 30, 2010 Share Posted March 30, 2010 Thanks Alan, those are pretty cool I wish I had the CAD experience to go along with the LISP exprience - just looked at the 'Leaders' Tool Palette in 2010 - I can't believe how many options there are, and to think, I have made LISP's for many of those options available. Lee Autodesk released a few goodies. Quote Link to comment Share on other sites More sharing options...
dbroada Posted March 30, 2010 Share Posted March 30, 2010 and to think, I have made LISP's for many of those options available. that is the problem if you don't explore the program. We use a lot of sub contract staff here and I've lost count of the number of times I patiently explain "and we use this routine to do.....", only for them to say "oh, a bit like the XXXX command?" Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted March 30, 2010 Share Posted March 30, 2010 that is the problem if you don't explore the program. We use a lot of sub contract staff here and I've lost count of the number of times I patiently explain "and we use this routine to do.....", only for them to say "oh, a bit like the XXXX command?" True, its embarassing when you make a LISP for which a command already exists - kinda undermines your knowledge of the program. Quote Link to comment Share on other sites More sharing options...
alanjt Posted March 30, 2010 Share Posted March 30, 2010 True, its embarassing when you make a LISP for which a command already exists - kinda undermines your knowledge of the program. I had a little chuckle when you guys were creating routines to display XYZ of a picked point. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted March 30, 2010 Share Posted March 30, 2010 I had a little chuckle when you guys were creating routines to display XYZ of a picked point. I bet you did I did too when I saw your post - I thought there had to be some command for it Quote Link to comment Share on other sites More sharing options...
alanjt Posted March 30, 2010 Share Posted March 30, 2010 I bet you did I did too when I saw your post - I thought there had to be some command for it Happens to all of us. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.