Jump to content

Add Blocks to my own Panel


dsibbo

Recommended Posts

I would strongly advise not using the CUI to customize the Ribbon for these types of things. This is exactly what Tool Palettes are intended for. Sure, you might have been used to it at a previous employer but you are still losing functionality, ease of use, and painless networking to share among others in the office.

 

rkent is one of the most talented people on this forum and I've learned a lot from him. What he's teaching will work, but it's painstakingly easy to leverage Tool Palettes instead.

 

Just my $0.02.

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

dsibbo, this is what i have on my macro to acomplish this:

^C^C(command ".insert" "I:/DETAILS/BORDERS/Shop Dwgs Borders/11X17-XX" "0,0" "1" "1" "0")

from what i see, you do not have the first part: ^C^C [this cancels any exsisting command]

the other difference i notice is in the beggining as well: (command ".insert"

make sure to leave a space between the word command and ". And to place a period before the insert.

Link to comment
Share on other sites

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.

 

[ATTACH=CONFIG]38163[/ATTACH]

[ATTACH=CONFIG]38164[/ATTACH]

 

You are mixing macro protocol with lisp protocol and then using \ when you should use / in the folder path.

Notice that you have insert in quotes, this won't work with a macro. Go back to my post and copy either the string in ( ) or the macro string, past that into your macro in the CUI and then edit the parts necessary for your block.

 

Here is the macro string, I just noticed I had a mistake in there also so I fixed that below. Notice again the / in the path, and the \ for a pause, and the \ pause is just in a macro.

^C^Cinsert;"C:/ACAD/DWG/LIB/singlesocket ";\1;1;0;

 

; = enter

\ = pause (I had the wrong slash shown here from my previous post. I said I am not a macro guy, barely a lisp guy.)

Edited by rkent
Link to comment
Share on other sites

I would strongly advise not using the CUI to customize the Ribbon for these types of things. This is exactly what Tool Palettes are intended for. Sure, you might have been used to it at a previous employer but you are still losing functionality, ease of use, and painless networking to share among others in the office.

 

Just my $0.02.

 

StykeFacE, you do make a good point here as I have both tool palettes with various blocks and my Ribbon which has other blocks. In my Ribbon I have about 20 fairly generic blocks that I find myself using all the time and on the same Ribbon Tab I have multiple panels with very common commands that I like to have handy. I mostly keep that one tab up all the time and toggle over to the others when needed.

 

For the bulk of my blocks I use tool palettes as it is very easy to create those. For those I place common blocks in a folder, navigate to DesignCenter, right click and pick create palette, wait a few seconds and the palette is made. If blocks change or are added I delete the palette and repeat.

 

I mostly built the Ribbon tab just to learn CUI customizing of the Ribbon and to really try out working with the Ribbon. I have found that I really like having the Ribbon up there in its customized format and don't mind losing the realestate to have it showing all the time. Having used it for a while I have learned where everything is located and so it is fairly fast to use. I of course use lots of key command shortcuts as well as tool palettes. I like to keep the layers toolbar docked to the bottom of the Ribbon as that seems to be used all the time and I don't want to navigate through the Ribbon to get back to Layers. Might as well mention that I mostly use my cursorsize set at 2 these days and toggle it to 100 when needed, I used 100 for the first 22 years using this program but I find the smaller cursor is the way to go for me.

 

My ribbon has my custom tab, as well as Annotate, Parametric, Express Tools. The contextual part of the Ribbon is where those that don't use the Ribbon are really missing out. Since they (Autodesk) are focusing on the Ribbon right now the truly handy part of the Ribbon is the contextual portion.

Link to comment
Share on other sites

OK I have changed the slashes around from \ to / and appear to have made some progress. It now appears to recognise the folder when I hit my button but I now get the message below saying my block references itself. So I'm still going slightly wrong somewhere.

 

Do you understand this?

 

Enter block name or [?]: "//BLACKTHORN/RedirectedFolders/my name/Desktop/Dom Blocks/Patient Call/Patient Call Control Panels "

Block Patient Call Control Panels references itself

 

I have pasted my macro below for this block

 

^C^Cinsert;"//BLACKTHORN/RedirectedFolders/my name/Desktop/Dom Blocks/Patient Call/Patient Call Control Panels ";\1;1;0;

Link to comment
Share on other sites

OK I have changed the slashes around from \ to / and appear to have made some progress. It now appears to recognise the folder when I hit my button but I now get the message below saying my block references itself. So I'm still going slightly wrong somewhere.

 

Do you understand this?

 

Enter block name or [?]: "//BLACKTHORN/RedirectedFolders/my name/Desktop/Dom Blocks/Patient Call/Patient Call Control Panels "

Block Patient Call Control Panels references itself

 

I have pasted my macro below for this block

 

^C^Cinsert;"//BLACKTHORN/RedirectedFolders/my name/Desktop/Dom Blocks/Patient Call/Patient Call Control Panels ";\1;1;0;

 

This message means the block name is the same as the .dwg name. You don't want a block inside a .dwg (in the context of a .dwg being used as a single block) so to fix this open the .dwg, explode the block, save, try again.

Edited by rkent
Link to comment
Share on other sites

StykeFacE, you do make a good point here as I have both tool palettes with various blocks and my Ribbon which has other blocks. In my Ribbon I have about 20 fairly generic blocks that I find myself using all the time and on the same Ribbon Tab I have multiple panels with very common commands that I like to have handy. I mostly keep that one tab up all the time and toggle over to the others when needed.

 

For the bulk of my blocks I use tool palettes as it is very easy to create those. For those I place common blocks in a folder, navigate to DesignCenter, right click and pick create palette, wait a few seconds and the palette is made. If blocks change or are added I delete the palette and repeat.

 

I mostly built the Ribbon tab just to learn CUI customizing of the Ribbon and to really try out working with the Ribbon. I have found that I really like having the Ribbon up there in its customized format and don't mind losing the realestate to have it showing all the time. Having used it for a while I have learned where everything is located and so it is fairly fast to use. I of course use lots of key command shortcuts as well as tool palettes. I like to keep the layers toolbar docked to the bottom of the Ribbon as that seems to be used all the time and I don't want to navigate through the Ribbon to get back to Layers. Might as well mention that I mostly use my cursorsize set at 2 these days and toggle it to 100 when needed, I used 100 for the first 22 years using this program but I find the smaller cursor is the way to go for me.

 

My ribbon has my custom tab, as well as Annotate, Parametric, Express Tools. The contextual part of the Ribbon is where those that don't use the Ribbon are really missing out. Since they (Autodesk) are focusing on the Ribbon right now the truly handy part of the Ribbon is the contextual portion.

I wholeheartedly agree with you. The motivation behind my caution is in case these two posters are wanting to know the best way to leverage a repository of cataloged blocks, especially if they intend to access across a network for a team to use. You are among the elite when it comes to OOTB customizing. Guys like you are a dying breed, especially at your level of years working the program. You just don't find people that put in the time and effort to customize and intuitively alter their Workspace, interface, etc.

 

Another intention of my response is really because of networking. Soon as you want to distribute a custom CUI file in networked environment, things can get really messy. I've done it before, but then I'm basically ruling over someone else's Workspace/Interface. Tool Palettes is simply a "window" to tools, commands and custom LISP routines. We use them in sync with AutoCAD Profiles to maintain different paths, for different jobs and clients. This way, the end user has their exact same Workspace the way "they" want it, and only the source tools change, using the same "window" to access them (ie: Tool Palettes). But, alas, it is simply my opinion and I'm only playing devil's advocate in the end. :)

 

On a side note, I did attempt to customize the Ribbon once and I got pretty far. But then I find myself using Revit more and more, and have just pushed AutoCAD aside these days.

 

8)

Link to comment
Share on other sites

This message means the block name is the same as the .dwg name. You don't want a block inside a .dwg so to fix this open the .dwg, explode the block, save, try again.

 

OK My Blocks are dynamic blocks so I can't explode them within the DWG file because i'll lose all its attributes.

 

However I did change the name of the file from the same name as the block and it worked. I can now enter my block into the drawing.

 

I don't want the block to have an insertion point of 1,1,0 etc so I removed that from macro. I want my block to be centre of my cross hairs so that when i press the button I can just place it where I want. At the moment it appears my basepoint is a fair bit away from the actual block.

 

I also have to enter a scale factor upon insertion for x & y and also a rotation.

 

How do I get it so that as soon as i press the button my block is centre of the cross hairs and all that is left to do is position it where I would like it without a rotate & scale factor needed.

Link to comment
Share on other sites

dsibbo, lets go back to the macro I posted

^C^Cinsert;"C:/ACAD/DWG/LIB/singlesocket ";\1;1;0;

 

After the "path and block name" comes a ; which is enter in macro language, next is a \ which is pause, so it is waiting for user input, in this case for you to pick a point on the screen, after that comes 1;1;0;, that is a 1 for the X scale, 1 for the Y scale, 0 for the rotation.

 

As for the block not being at your cursor, most likely you need to open your file, block edit the block and move everything to be centered at 0,0.

Link to comment
Share on other sites

Uh.... um..... :unsure: of course.... not? lol, you caught me, so I reworded it to sound better but I guess you got the message. Obviously I am relating your age to experience and not some old geezer who is still among the sharper tools in the shed.

 

8)

Link to comment
Share on other sites

I have had a go at what you suggested and it has worked. I have opened all my blocks and made sure they are at 0,0,0 and saved them all into seperate dwg files for me to reference to.

 

The problem I have now is that when I press the button and place the blocks, the block no longer allows me to use all the dynamic functions I have set up for them. E.g. Visability dropdown menu, stretch at increments etc. I have to explode the block to be able to use these functions.

 

???:?

Link to comment
Share on other sites

The problem I have now is that when I press the button and place the blocks, the block no longer allows me to use all the dynamic functions I have set up for them. E.g. Visability dropdown menu, stretch at increments etc. I have to explode the block to be able to use these functions.
Tool Palettes give you this option. :)

 

*EDIT*

Or you can put this code at the end of the Command String:

(command "explode" (entlast))(princ)

Link to comment
Share on other sites

I have had a go at what you suggested and it has worked. I have opened all my blocks and made sure they are at 0,0,0 and saved them all into seperate dwg files for me to reference to.

 

The problem I have now is that when I press the button and place the blocks, the block no longer allows me to use all the dynamic functions I have set up for them. E.g. Visability dropdown menu, stretch at increments etc. I have to explode the block to be able to use these functions.

 

???:?

 

dsibbo - as an experiment make a copy of one of your .dwg files with the dyn block in it. Open that up, list the name of the block that already resides in there. Now use the wblock command, use the block option, use the block name you just listed, point to a folder you want, finish the command. Close out of that drawing. Now open the new dwg you just created, it should come up to a message telling you this is a dynamic block and how do you want to proceed, pick either one and then close. Now that drawing will work as you want for inserting in to a drawing through the palettes or the ribbon.

 

I haven't spent a great deal of time with dynamic blocks but I tried this yesterday and so I know it works. There may be better ways to get dynamic blocks in a .dwg file but I don't know, maybe StykFace or others have used dyn blocks more and know the shortcuts.

Link to comment
Share on other sites

Tool Palettes give you this option. :)

 

*EDIT*

Or you can put this code at the end of the Command String:

(command "explode" (entlast))(princ)

 

Haha You truly are championing Tool Palettes and you have managed to convince me to stick with this option for the majority of my blocks. I'm only going to create a ribbon with one tab for my most used blocks instead of them all now.

 

Having created a lovely tool palette this morning I still need to explode my blocks to get their dynamic properties to become available so where is this option you talk about?

Link to comment
Share on other sites

Haha You truly are championing Tool Palettes and you have managed to convince me to stick with this option for the majority of my blocks. I'm only going to create a ribbon with one tab for my most used blocks instead of them all now.

 

Having created a lovely tool palette this morning I still need to explode my blocks to get their dynamic properties to become available so where is this option you talk about?

Right-click the block on the Tool Palette, click Properties. You'll see the option. Also note, you can Ctrl+Click the first block, then Shift+Click the last block (on the Tool Palette) to select all blocks you need, right-click > Properties, and perform this option globally.

 

And yes I do champion Tool Palettes, only because in your case they will work best. But, I still left you an alternative that still works for the CUI method.

 

:)

Link to comment
Share on other sites

Haha You truly are championing Tool Palettes and you have managed to convince me to stick with this option for the majority of my blocks. I'm only going to create a ribbon with one tab for my most used blocks instead of them all now.

 

Having created a lovely tool palette this morning I still need to explode my blocks to get their dynamic properties to become available so where is this option you talk about?

 

You can easily explode the block in the ribbon (or palette) BUT you should simply fix your dynamic blocks as I described above^^^.

#37

I would agree with using the palette for most blocks.

 

To explode a block on insertion you add the asterisk * in the front of the name of the block, or the front of the path and name.

Thusly,

 

^C^C(command "insert" "*C:/acad/dwg/sprocket")

Note the * prior to the C: > "*C:/..."

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...