Jump to content

Add Blocks to my own Panel


dsibbo

Recommended Posts

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

Link to comment
Share on other sites

  • Replies 47
  • Created
  • Last Reply

Top Posters In This Topic

  • dsibbo

    14

  • rkent

    13

  • ReMark

    7

  • tzframpton

    7

Top Posters In This Topic

Posted Images

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

I am also trying to do something simular, how would associating the icon with the particular dwg that has the particular block desired?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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 by rkent
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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 \

cui 102412.jpg

Edited by rkent
Link to comment
Share on other sites

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.

 

CUI1.jpg

CUI2.jpg

CUI2.jpg

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...