Jump to content

Help needed with custom Macro command


garygoude

Recommended Posts

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

Link to comment
Share on other sites

  • Replies 21
  • Created
  • Last Reply

Top Posters In This Topic

  • garygoude

    8

  • Tyke

    5

  • Tuns

    5

  • rkmcswain

    3

Top Posters In This Topic

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

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