garygoude Posted November 11, 2013 Posted November 11, 2013 I have generated the following Macro in a drop down menu for quick insertion of some of my company's standard blocks. I want to know how to add the function explode to the command so as soon as I have placed the block using the macro it exploded on placement or selection of the macro. ^C^C-insert;F:/Blocks/CAN.dwg Quote
ReMark Posted November 11, 2013 Posted November 11, 2013 Precede the block name with an asterick and it will be exploded upon insertion. Why would you want to do that? Quote
Tuns Posted November 11, 2013 Posted November 11, 2013 ^C^C-insert;F:/Blocks/CAN.dwg;\explode;last;; I don't know if that will work. I didn't even try it. Quote
rkmcswain Posted November 11, 2013 Posted November 11, 2013 ^C^C-insert;F:/Blocks/CAN.dwg;\explode;last;; I don't know if that will work. I didn't even try it. See Remark's answer. The * will do it. [Ref: -INSERT command] Quote
garygoude Posted November 11, 2013 Author Posted November 11, 2013 Thanks, I have goen with the * method and it has worked perfectly. In reply to ReMark, I need to explode to block because it holds visibility parameters. Without the * I found I needed to explode the block once to release the visibility drop down 'grip'. Thanks all for the fast responses! Quote
Tuns Posted November 11, 2013 Posted November 11, 2013 See Remark's answer. The * will do it.[Ref: -INSERT command] Oh, I never knew that. Thanks. Quote
Tyke Posted November 11, 2013 Posted November 11, 2013 Precede the block name with an asterick and it will be exploded upon insertion. Why would you want to do that? We have quite a lot of standard text (very short just a couple of words) and save each of them as a block and when you explode the block on insertion you have your text entity. Layer, colour, rotation, etc can all be set in the macro. Much neater is to do it from a custom palette where you can set layer, colour, etc and even explode it on insertion and dynamically set the rotation of the text, which is great when your text is not necessarily horizontal or vertical but can vary. Quote
Tyke Posted November 11, 2013 Posted November 11, 2013 Oh, I never knew that. Thanks. A before the command -INSERT will cause the insertion to loop until Esc is pressed. Quote
Tuns Posted November 11, 2013 Posted November 11, 2013 A before the command -INSERT will cause the insertion to loop until Esc is presses. I know that, but that isn't what I meant. I didn't know that a * before the block name would explode the block when inserted. Quote
garygoude Posted November 11, 2013 Author Posted November 11, 2013 Just a quick follow up question guys....my new macro that albeit works fine (^C^C-insert;*F:/Blocks/CAN.dwg) obviously asks me to pick an insertion point with my cursor, this is fine, but then it asks to specify the scale and then the rotation angle. Both of which can be bypassed with two right clicks or two space bar presses, but is there any extra code that can be put on the end of the macro to specify I want the inserted block not to be scaled and a zero rotation angle? Just trying to streamline the process even faster. Quote
Tuns Posted November 11, 2013 Posted November 11, 2013 ^C^C-insert;*F:/Blocks/CAN.dwg;\;; Try that? Quote
Tyke Posted November 11, 2013 Posted November 11, 2013 try ^C^C-insert;*F:/Blocks/CAN.dwg;\1;1;0 Quote
garygoude Posted November 11, 2013 Author Posted November 11, 2013 Thanks for these guys both worked fine but I had to change this...try ^C^C-insert;*F:/Blocks/CAN.dwg;\1;1;0 to this...try ^C^C-insert;*F:/Blocks/CAN.dwg;\1;0;0 .....sure it was just a typo though! I am guessing that in the case of ^C^C-insert;*F:/Blocks/CAN.dwg;\;; the "\;;" is the command for ENTER ENTER? Is there anywhere good I can learn more about macro commands, a lot of what we do to relies on blocks and standard parts in our drawings and some more knowledge would be useful to streamline the drawings we produce. Thanks Quote
Tuns Posted November 11, 2013 Posted November 11, 2013 I am guessing that in the case of ^C^C-insert;*F:/Blocks/CAN.dwg;\;; the "\;;" is the command for ENTER ENTER? Is there anywhere good I can learn more about macro commands, a lot of what we do to relies on blocks and standard parts in our drawings and some more knowledge would be useful to streamline the drawings we produce. Thanks Yes, ";" in a macro = "Enter". This is a good place to start if you want to learn the basics. After you learn the basics, it would be smart to learn about diesel expressions. Quote
garygoude Posted November 11, 2013 Author Posted November 11, 2013 Thanks for that Tuns, bedtime reading for tonight! Thanks again everyone! Quote
Tyke Posted November 11, 2013 Posted November 11, 2013 Here's a handy little PDF file to get you going http://www.cadcentar.com/DIESEL.pdf And this from Ralph Grabowski http://www.upfrontezine.com/tailor/tailor17.htm with the following Part 18. Dietmar Rudolph has a series of short articles http://www.crlf.de/Dokumente/Diesel/Diesel1.html .../Diesel2.html .../Diesel3.html .../Diesel4.html .../Diesel5.html That should get you going Quote
garygoude Posted November 11, 2013 Author Posted November 11, 2013 Thanks Tyke, only scan read your links just now but all looks like really useful stuff. Cheers Quote
Tyke Posted November 11, 2013 Posted November 11, 2013 Thanks Tyke, only scan read your links just now but all looks like really useful stuff. Cheers You're welcome mate, any time Quote
rkmcswain Posted November 11, 2013 Posted November 11, 2013 Oh, I never knew that. Thanks. No problem, there are a lot of good old command line tricks out there Quote
garygoude Posted November 12, 2013 Author Posted November 12, 2013 Hi guys, I am still having some problems with these macros. I have this macro:- ^C^C-insert;*F:/Blocks/CAN.dwg;\1;0;0 Which as I have understood so far, allows me to insert and explode a block from a given file location, then pause for defining the insertion point, then automatically sets scale at 1 and rotation at 0. The trouble I have is with the insertion point. The command pauses for me to click an insertion point, but the block jumps over to the lower left rather than the insertion point I have selected. I have the source file defined correctly about 0,0,0 and I cannot make head nor tail or the coordinates the blocks are jumping to. Any ideas? I have attached the source file if that helps... CAN.dwg Quote
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.