Jump to content
garygoude

Help needed with custom Macro command

Recommended Posts

garygoude

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

Share this post


Link to post
Share on other sites
ReMark

Precede the block name with an asterick and it will be exploded upon insertion.

 

Why would you want to do that?

Share this post


Link to post
Share on other sites
Tuns

^C^C-insert;F:/Blocks/CAN.dwg;\explode;last;;

I don't know if that will work. I didn't even try it.

Share this post


Link to post
Share on other sites
rkmcswain
^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]

Share this post


Link to post
Share on other sites
garygoude

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!

Share this post


Link to post
Share on other sites
Tyke
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.

Share this post


Link to post
Share on other sites
Tyke
Oh, I never knew that. Thanks. :)

 

A before the command -INSERT will cause the insertion to loop until Esc is pressed.

Share this post


Link to post
Share on other sites
Tuns
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.

Share this post


Link to post
Share on other sites
garygoude

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.

Share this post


Link to post
Share on other sites
Tuns

^C^C-insert;*F:/Blocks/CAN.dwg;\;;

Try that?

Share this post


Link to post
Share on other sites
Tyke

try ^C^C-insert;*F:/Blocks/CAN.dwg;\1;1;0

Share this post


Link to post
Share on other sites
garygoude

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

Share this post


Link to post
Share on other sites
Tuns

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.

Share this post


Link to post
Share on other sites
garygoude

Thanks for that Tuns, bedtime reading for tonight!

 

Thanks again everyone!

Share this post


Link to post
Share on other sites
Tyke

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 ;)

Share this post


Link to post
Share on other sites
garygoude

Thanks Tyke, only scan read your links just now but all looks like really useful stuff. Cheers :thumbsup:

Share this post


Link to post
Share on other sites
Tyke
Thanks Tyke, only scan read your links just now but all looks like really useful stuff. Cheers :thumbsup:

 

You're welcome mate, any time :beer:

Share this post


Link to post
Share on other sites
rkmcswain
Oh, I never knew that. Thanks. :)

 

No problem, there are a lot of good old command line tricks out there 8)

Share this post


Link to post
Share on other sites
garygoude

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

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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