dsibbo Posted October 23, 2012 Share Posted October 23, 2012 Hello, Can anyone tell me how I can add blocks I have created to a Panel I have created on my Ribbon. I have a drawing where I have created numerous dynamic blocks, I have now created a tab on my ribbon & have created several panels from this tab e.g. Power, Fire, Containment etc I would like to insert buttons to each panel relating to each block, for example I would have a button in my Power panel which is called Single Socket and when I press it my single socket block from my block drawing appears and can be added. Thank you Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 23, 2012 Share Posted October 23, 2012 I think it would make more sense to create a custom tool palette and populate it with your blocks. Quote Link to comment Share on other sites More sharing options...
dsibbo Posted October 23, 2012 Author Share Posted October 23, 2012 I currently have the palette set up but in my previous employment I used the ribbon format as described above and would like to convert my current computer to this way Quote Link to comment Share on other sites More sharing options...
rkent Posted October 23, 2012 Share Posted October 23, 2012 You will have to go into the CUI and in the command list portion, add a new command for the first one, after you have it set, drag that up into the panel in the first Row, create a Row if you haven't already. If that one works, then copy the first one in the command list area, modify for the next name, drag and drop, continue. You will need each block as its own .dwg file, pick a spot on your local drive to create a library folder, place your blocks there, use that path for the command for each one. Add more Rows as necessary and continue creating a command for each block, dragging and dropping in the panel you have selected. Quote Link to comment Share on other sites More sharing options...
tomhamlet Posted October 23, 2012 Share Posted October 23, 2012 I am also trying to do something simular, how would associating the icon with the particular dwg that has the particular block desired? Quote Link to comment Share on other sites More sharing options...
rkent Posted October 23, 2012 Share Posted October 23, 2012 tomhamlet, would you rephrase your question, I am not entirely sure what you are asking. Quote Link to comment Share on other sites More sharing options...
tomhamlet Posted October 23, 2012 Share Posted October 23, 2012 Ok. I have kind of ansered my question but still need to know more about it. I have made an icon on my insert palette to insert my border named "11X17-XX". AutoCAD looks for this in my C drive. At first it was not in my C drive but I eventually put it there. Now it works. So now my question here is how do I make AutoCAD search in a different drive, such as my I drive, for this border? Also, my current macro for this button is C^C^_INSERT 11X17-XX. This gets the border on my screen, but how would I go about satisfying AutoCAD's arguments so that when I hit my icon AutoCAD knows to place my border with the basepoint on 0,0; the scale at 1; and the rotation at 0 degrees? Quote Link to comment Share on other sites More sharing options...
rkent Posted October 23, 2012 Share Posted October 23, 2012 (edited) I use this instead of a macro, pretty much the same, same. Obviously adjust for your folder path and file name. (command ".insert" "I:/DwgLib/_TB17x11" "0,0" "1" "1" "0") Inserts at 0,0, X scale of 1, Y scale of 1, rotation of 0 Edited October 25, 2012 by rkent Quote Link to comment Share on other sites More sharing options...
tomhamlet Posted October 24, 2012 Share Posted October 24, 2012 It works! Thanks for the help rkent! I only have one more question. Is there a way to get this on to all of my coworkers computers without going to everyone and doing it manually? Quote Link to comment Share on other sites More sharing options...
rkent Posted October 24, 2012 Share Posted October 24, 2012 I would look to Robert Bell for this, search on the web for enterprise cui robert bell He has a paper on the Autodesk University Augi site, it will be worth registering in order to get a hold of this paper. Good luck. Quote Link to comment Share on other sites More sharing options...
tomhamlet Posted October 24, 2012 Share Posted October 24, 2012 Thanks. I will look into it! I apreciate the help. Quote Link to comment Share on other sites More sharing options...
dsibbo Posted October 24, 2012 Author Share Posted October 24, 2012 You will have to go into the CUI and in the command list portion, add a new command for the first one, after you have it set, drag that up into the panel in the first Row, create a Row if you haven't already. If that one works, then copy the first one in the command list area, modify for the next name, drag and drop, continue. You will need each block as its own .dwg file, pick a spot on your local drive to create a library folder, place your blocks there, use that path for the command for each one. Add more Rows as necessary and continue creating a command for each block, dragging and dropping in the panel you have selected. rKent thanks for the reply. I have saved all my blocks in my own individual files on my desktop for now. So far I have managed to create a command called single socket and have dragged this to my power tab. This now shows up as a blank button which does nothing when I press it. So my next question is how do I get the button to link to the block file on my desktop? One more question is how do I get the button image to be that of the block in the DWG file? Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 24, 2012 Share Posted October 24, 2012 Did you include the path to the block? Quote Link to comment Share on other sites More sharing options...
dsibbo Posted October 24, 2012 Author Share Posted October 24, 2012 No thats what i'm trying to do. How do I do this? Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 24, 2012 Share Posted October 24, 2012 Add it to your CUI where it says Properties > Command > Macro. Quote Link to comment Share on other sites More sharing options...
rkent Posted October 24, 2012 Share Posted October 24, 2012 (edited) No thats what i'm trying to do. How do I do this? You need to edit the command for that block in the CUI, in the macro section use this or something similar ^C^C(command "INSERT" "C:/ACAD/DWG/LIB/singlesocket ") This is using a simple list string, you can use macro's as well, I am more comfortable with this method. Macro would look like ^C^Cinsert;"C:/ACAD/DWG/LIB/singlesocket ";\1;1;0; ; = enter \ = pause 1;1;0; = scale factor for X of 1, for Y of 1, rotation of 0, if you want to be able to specify those then you would use a pause instead or just not show any of that after the \ Edited October 25, 2012 by rkent Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 24, 2012 Share Posted October 24, 2012 How many blocks will you be doing all this for? Quote Link to comment Share on other sites More sharing options...
dsibbo Posted October 25, 2012 Author Share Posted October 25, 2012 You need to edit the command for that block in the CUI, in the macro section use this or something similar^C^C(command "INSERT" "C:/ACAD/DWG/LIB/singlesocket ") This is using a simple list string, you can use macro's as well, I am more comfortable with this method. Macro would look like ^C^Cinsert;"C:/ACAD/DWG/LIB//singlesocket ";\1;1;0; ; = enter / = paust 1;1;0; = scale factor for X of 1, for Y of 1, rotation of 0, if you want to be able to specify those then you would use a pause instead or just not show any of that after the \ rKent I have had a go at what you suggested this morning but I still cannot seem to get it to work. I get a message "INSERT" Unknown command ""INSERT"" when I try your first suggestion and with the second suggestion CAD asks me to type the name of the block. I've attached 2 images of my macro and my file location so you can see if there is anything obvious I am doing wrong. Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 25, 2012 Share Posted October 25, 2012 How many blocks will you be going through this same procedure for? If you had elected to utilize tool palettes you would probably be done by now. Quote Link to comment Share on other sites More sharing options...
dsibbo Posted October 25, 2012 Author Share Posted October 25, 2012 How many blocks will you be going through this same procedure for? If you had elected to utilize tool palettes you would probably be done by now. I have around 30-40 blocks to do this for. I have already got tool palettes set up with my blocks on. Time isn't really an issue here, as I have the blocks on the palettes which works fine and is acceptable for the mean time, it is simply a case of me wanting to learn how to add my own blocks to ribbons. 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.